當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript util.assetUrl函數代碼示例

本文整理匯總了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',
];

開發者ID:JanStureNielsen,項目名稱:angular,代碼行數:29,代碼來源:output_emitter_util.ts

示例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',
];

開發者ID:aftab10662,項目名稱:angular,代碼行數:29,代碼來源:output_emitter_util.ts

示例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});
開發者ID:davewragg,項目名稱:angular,代碼行數:30,代碼來源:output_emitter_util.ts


注:本文中的@angular/compiler/src/util.assetUrl函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。