export class UrlResolver
export class UrlResolver
exported from angular2/compiler defined in angular2/src/compiler/url_resolver.ts (line 24)
Used by the Compiler when resolving HTML and CSS template URLs.
This class can be overridden by the application developer to create custom behavior.
See Compiler
Example
Annotations
@Injectable()
@Injectable()
Constructor
constructor(packagePrefix?: string)
constructor(packagePrefix?: string)Not Yet Documented
Members
resolve(baseUrl: string, url: string) : string
resolve(baseUrl: string, url: string) : string
Resolves the url given the baseUrl:
- when the 
urlis null, thebaseUrlis returned, - if 
urlis relative ('path/to/here', './path/to/here'), the resolved url is a combination ofbaseUrlandurl, - if 
urlis absolute (it has a scheme: 'http://', 'https://' or start with '/'), theurlis returned as is (ignoring thebaseUrl)