I wanted to use this feature to create global pipe: https://angular.io/docs/ts/latest/api/core/index/PLATFORM_PIPES-let.html
But this is deprecated, and it says: Providing platform pipes via a provider is deprecated. Provide platform pipes via an AppModule instead.
Documentation is really non-existent, here is the old version I need to make into newer one:
import {PLATFORM_PIPES} from '@angular/core';
import {OtherPipe} from './myPipe';
@Component({
selector: 'my-component',
template: `
{{123 | other-pipe}}
`
})
export class MyComponent {
...
}
bootstrap(MyComponent, [{provide: PLATFORM_PIPES, useValue: [OtherPipe], multi:true}]);
So does anyone know how to transform this example to new version that uses AppModule?