I was interested in utilizing a feature to create a global pipe and came across this link: https://angular.io/docs/ts/latest/api/core/index/PLATFORM_PIPES-let.html
However, I discovered that it is deprecated with the following message: Providing platform pipes via a provider is deprecated. The recommendation is to provide platform pipes via an AppModule instead.
The lack of documentation on this is frustrating. Here is the old version that needs to be updated:
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}]);
Does anyone have insights on how to transform this example into a new version that utilizes the AppModule?