JoeyXXX
JoeyXXX

Reputation: 21

Angular 5 downgradeModule not work in hybrid mode

I am trying to change my hybrid app from upgrademodule to downgrademodule, since the $digest fire too much issue.

But I found app is work well, just ng2 components does not work while all things in ng1 works fine.

I had create a plunker: https://plnkr.co/edit/ZaIp5i20fiqH1vfBnZ99?p=info

I add the test component in main.ts:

angular.module('interestApp').directive('test', downgradeComponent({component: Test}));

And add to $stateProvider in script.js:

$stateProvider
    .state('home', {
      template: '<test></test>',
      url: '/'
    })

But when I click the link -> home. nothing happened only label stay in html.

This works fine in upgrademodule.

Please help me out! Any suggestions or answers are welcomed.

Thanks

Upvotes: 1

Views: 747

Answers (1)

JoeyXXX
JoeyXXX

Reputation: 21

Finally, I found out how to use downgrademodule. If anyone have encountered same questions, please refer to this issue: https://github.com/angular/angular/issues/20856

Upvotes: 1

Related Questions