I thought that if you add an import to the controller.ts file, that it had to be added to app.module.ts as well. But, when I added the NgForm to my controller alone without adding it to app.module.ts my code worked fine. Then when I added it to app.module.ts I got an error. What is the right way to do it?
--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular/635c3250-2778-46ed-aa72-1d441908ddefo%40googlegroups.com.
If your controller.ts is part of a module that is added in app.module.ts then it doesn't need to have that import.
I think you worked it out !
On Mon, Jun 29, 2020 at 2:17 AM Maureen Moore <maka...@gmail.com> wrote:
I thought that if you add an import to the controller.ts file, that it had to be added to app.module.ts as well. But, when I added the NgForm to my controller alone without adding it to app.module.ts my code worked fine. Then when I added it to app.module.ts I got an error. What is the right way to do it?--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ang...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular/88e879d2-9bb2-4902-a31b-09744b7e4203o%40googlegroups.com.