TypeScript @angular-compiler-src-util.assetUrl类(方法)实例源码

下面列出了TypeScript @angular-compiler-src-util.assetUrl 类(方法)源码代码实例,从而了解它的用法。

作者:JanStureNielse    项目:angula   
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',
];

作者:aftab1066    项目:angula   
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',
];

作者:davewrag    项目:angula   
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});


问题


面经


文章

微信
公众号

扫码关注公众号