Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | /**
|
---|
| 9 | * Create a {@link UrlResolver} with no package prefix.
|
---|
| 10 | */
|
---|
| 11 | export declare function createUrlResolverWithoutPackagePrefix(): UrlResolver;
|
---|
| 12 | export declare function createOfflineCompileUrlResolver(): UrlResolver;
|
---|
| 13 | /**
|
---|
| 14 | * Used by the {@link Compiler} when resolving HTML and CSS template URLs.
|
---|
| 15 | *
|
---|
| 16 | * This class can be overridden by the application developer to create custom behavior.
|
---|
| 17 | *
|
---|
| 18 | * See {@link Compiler}
|
---|
| 19 | *
|
---|
| 20 | * ## Example
|
---|
| 21 | *
|
---|
| 22 | * <code-example path="compiler/ts/url_resolver/url_resolver.ts"></code-example>
|
---|
| 23 | *
|
---|
| 24 | * @security When compiling templates at runtime, you must
|
---|
| 25 | * ensure that the entire template comes from a trusted source.
|
---|
| 26 | * Attacker-controlled data introduced by a template could expose your
|
---|
| 27 | * application to XSS risks. For more detail, see the [Security Guide](https://g.co/ng/security).
|
---|
| 28 | */
|
---|
| 29 | export interface UrlResolver {
|
---|
| 30 | resolve(baseUrl: string, url: string): string;
|
---|
| 31 | }
|
---|
| 32 | export interface UrlResolverCtor {
|
---|
| 33 | new (packagePrefix?: string | null): UrlResolver;
|
---|
| 34 | }
|
---|
| 35 | export declare const UrlResolver: UrlResolverCtor;
|
---|
| 36 | /**
|
---|
| 37 | * Extract the scheme of a URL.
|
---|
| 38 | */
|
---|
| 39 | export declare function getUrlScheme(url: string): string;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.