angularangular2-directivesangular2-componentsangular2-pipe

How to downgrade custom pipe written with angular2 to be used in angular 1.5?


I wrote component that is using a pipe in angular 2. Now I am trying to downgrade the component to be used in my angular 1.5:

angular.module('myApp')
    .directive('Item', downgradeComponent({component: ItemComponent, inputs: ['item'], outputs: ['onTagRemoved'] }) as angular.IDirectiveFactory);

The template of my ItemComponentis using a new pipe. While downgrade I get error message about that pipe.

systemjs.import error: Error: (SystemJS) Can't resolve all parameters for tagPipe: (?).

Do I need to downgrade the pipe to? How? Didn't find anything while search for pipes downgrade.


Solution

  • You can't downgrade pipes - rewrite it. See this presentation from NG-CONF 2017:

    https://www.slideshare.net/jawache/migrating-from-angularjs-when-you-cant-use-the-word-big-bang

    https://www.youtube.com/watch?v=4p1jG2QNc4U