UNPKG

angular2

Version:

Angular 2 - a web framework for modern web apps

52 lines 1.61 kB
'use strict';var di_1 = require("angular2/src/core/di"); var lang_1 = require("angular2/src/facade/lang"); /** * A token that can be provided when bootstraping an application to make an array of directives * available in every component of the application. * * ### Example * * ```typescript * import {PLATFORM_DIRECTIVES} from 'angular2/angular2'; * import {OtherDirective} from './myDirectives'; * * @Component({ * selector: 'my-component', * template: ` * <!-- can use other directive even though the component does not list it in `directives` --> * <other-directive></other-directive> * ` * }) * export class MyComponent { * ... * } * * bootstrap(MyComponent, [provide(PLATFORM_DIRECTIVES, {useValue: [OtherDirective], multi:true})]); * ``` */ exports.PLATFORM_DIRECTIVES = lang_1.CONST_EXPR(new di_1.OpaqueToken("Platform Directives")); /** * A token that can be provided when bootstraping an application to make an array of pipes * available in every component of the application. * * ### Example * * ```typescript * import {PLATFORM_PIPES} from 'angular2/angular2'; * import {OtherPipe} from './myPipe'; * * @Component({ * selector: 'my-component', * template: ` * {{123 | other-pipe}} * ` * }) * export class MyComponent { * ... * } * * bootstrap(MyComponent, [provide(PLATFORM_PIPES, {useValue: [OtherPipe], multi:true})]); * ``` */ exports.PLATFORM_PIPES = lang_1.CONST_EXPR(new di_1.OpaqueToken("Platform Pipes")); //# sourceMappingURL=platform_directives_and_pipes.js.map