Angular2 PLATFORM_PIPES (Globally Available Custom Pipe) will be deprecated soon, so …
Jecelyn Yeen
163

It’s strange. I’ve tried both …

provide(CompilerConfig, {
useValue: new CompilerConfig({
platformPipes: [...COMMON_PIPES],
platformDirectives: [...COMMON_DIRECTIVES, MdlUpgradeDirective]
})
}),

… and …

{
provide: CompilerConfig,
useValue: new CompilerConfig({
platformPipes: [...COMMON_PIPES],
platformDirectives: [...COMMON_DIRECTIVES, MdlUpgradeDirective]
})
},

… yet neither work. I’ve moved a directive from being directly on a component into this “new” global definition, but it doesn’t seem to be picked up. Cannot work out what I’m doing wrong.