0

I'm working on migration of angular1.5 to angular10. My current code in angular1.5 with mobx(mobx-angularjs package is being used).

I have used downgradeComponent approach.

export default angular
.module('test', [])
.directive('myTest', downgradeComponent({component: MyTestComponent}) as angular.IDirectiveFactory);

angularjs template

<input ng-model="$ctrl.store.personname" name="personname" maxlength="40"/>

angular10 template

<input [(ngModel)]="store.personname" name="personname" maxlength="40"/>

After changed angular10 template, data binding is not working. Does angular10 expects mobx-angular pacakge instead of mobx-angularjs package?

I tried https://github.com/mobxjs/mobx-angular but no luck.

Thavaprakash Swaminathan
  • 6,226
  • 2
  • 30
  • 31

1 Answers1

1

try to import FomrsModule in your app.module !

import { FormsModule } from '@angular/forms';


imports: [

 ....

 FormsModule  , 
]