Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 564
AngularOne Avatar asked Oct 17 '25 01:10

AngularOne


1 Answers

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

like image 122
Julia Passynkova Avatar answered Oct 18 '25 17:10

Julia Passynkova



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!