Uncaught Error: Unexpected module 'FormsModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation

后端 未结 4 986
说谎
说谎 2021-01-30 19:26

I\'m new in Angular. I started Tour of Heroes to learn it. So, I am created an app.component with two-way binding.

import { Component          


        
4条回答
  •  春和景丽
    2021-01-30 19:47

    Things you can add to declarations: [] in modules

    • Pipe
    • Directive
    • Component

    Pro Tip: The error message explains it - Please add a @Pipe/@Directive/@Component annotation.

提交回复
热议问题