本文整理汇总了TypeScript中@angular/compiler/src/util.assetUrl函数的典型用法代码示例。如果您正苦于以下问题:TypeScript assetUrl函数的具体用法?TypeScript assetUrl怎么用?TypeScript assetUrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了assetUrl函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
import {ViewType} from '@angular/core/src/linker/view_type';
export class ExternalClass {
changeable: any;
constructor(public data: any) { this.changeable = data; }
someMethod(a: any /** TODO #9100 */) { return {'param': a, 'data': this.data}; }
}
var testDataIdentifier = new CompileIdentifierMetadata({
name: 'ExternalClass',
moduleUrl: `asset:@angular/lib/compiler/test/output/output_emitter_util`,
reference: ExternalClass
});
var eventEmitterIdentifier = new CompileIdentifierMetadata(
{name: 'EventEmitter', moduleUrl: assetUrl('core'), reference: EventEmitter});
var enumIdentifier = new CompileIdentifierMetadata({
name: 'ViewType.HOST',
moduleUrl: assetUrl('core', 'linker/view_type'),
reference: ViewType.HOST
});
var baseErrorIdentifier = new CompileIdentifierMetadata(
{name: 'BaseError', moduleUrl: assetUrl('core', 'facade/errors'), reference: BaseError});
export var codegenExportsVars = [
'getExpressions',
];
示例2: constructor
import * as o from '@angular/compiler/src/output/output_ast';
export class ExternalClass {
changeable: any;
constructor(public data: any) { this.changeable = data; }
someMethod(a: any /** TODO #9100 */) { return {'param': a, 'data': this.data}; }
}
var testDataIdentifier = new CompileIdentifierMetadata({
name: 'ExternalClass',
moduleUrl: `asset:@angular/lib/compiler/test/output/output_emitter_util`,
runtime: ExternalClass
});
var eventEmitterIdentifier = new CompileIdentifierMetadata(
{name: 'EventEmitter', moduleUrl: assetUrl('core'), runtime: EventEmitter});
var enumIdentifier = new CompileIdentifierMetadata({
name: 'ViewType.HOST',
moduleUrl: assetUrl('core', 'linker/view_type'),
runtime: ViewType.HOST
});
var baseExceptionIdentifier = new CompileIdentifierMetadata(
{name: 'BaseException', moduleUrl: assetUrl('core'), runtime: BaseException});
export var codegenExportsVars = [
'getExpressions',
];
示例3: constructor
import {ViewType} from '@angular/core/src/linker/view_type';
import {BaseException} from '../../src/facade/exceptions';
import {InstanceFactory, DynamicInstance} from '@angular/compiler/src/output/output_interpreter';
import {assetUrl} from '@angular/compiler/src/util';
import * as o from '@angular/compiler/src/output/output_ast';
export class ExternalClass {
changeable: any;
constructor(public data: any) { this.changeable = data; }
someMethod(a) { return {'param': a, 'data': this.data}; }
}
var testDataIdentifier = new CompileIdentifierMetadata({
name: 'ExternalClass',
moduleUrl: assetUrl('compiler', 'output/output_emitter_util'),
runtime: ExternalClass
});
var eventEmitterIdentifier = new CompileIdentifierMetadata(
{name: 'EventEmitter', moduleUrl: assetUrl('core'), runtime: EventEmitter});
var enumIdentifier = new CompileIdentifierMetadata({
name: 'ViewType.HOST',
moduleUrl: assetUrl('core', 'linker/view_type'),
runtime: ViewType.HOST
});
var baseExceptionIdentifier = new CompileIdentifierMetadata(
{name: 'BaseException', moduleUrl: assetUrl('core'), runtime: BaseException});