SPFxAngularCLI
SPFxAngularCLI copied to clipboard
ngModel and angular forms is not working.
I added the simple registration form in the cloned application. I want to add a simple form with some validations (with angular forms), but no message was displayed on the screen. I have added logs in the validation method and logs are displayed properly. I tried second option to show and hide the label on validation failed method still no luck. Can you suggest any modification in solution for this?
Have you tried adding them in a simple Angular CLI project - are you using exactly the same steps? What steps did you follow?
Thanks, Sahil for your response.
I followed the steps you mentioned in the article. The clone web part with view data was working perfectly on the same project then, I modified it with input text controls and label controls to achieve two-way binding. On the first load, it modifies data on the screen (UI) but later any changes from the screen (UI) are not reflecting on the associated model.
I have the same Problem. Somehow the Binding is deactivated. I think it has to be something with: platformBrowserDynamic().bootstrapModuleFactory( AppModuleNgFactory, { ngZone: 'noop' })
As i expected. You have to remove { ngZone: 'noop' } complete, than in the imports you need: import 'zone.js';
Now it works for me