0
With Angularjs I created a directive, and only imported using the tag and it was already available to use in any HTML file. I used this to centralize some visual objects that repeated themselves in various parts of the system, such as the navbar, sidebar, menus.. How do I do this using angular 5?
I read this documentation, when importing and trying to use Component, I get the following error: "Template parse errors: 'Navbarcomponent' is not a known element: 1. If 'Navbarcomponent' is an Angular Component, then Verify that it is part of this module. 2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@Ngmodule.schemas' of this Component. ("[ERROR ->]<Navbarcomponent></Navbarcomponent> ")"
– Angular Man
Your component A (Navbar) must be inside a module, which must be imported inside the module of component B (App)
– André Roggeri Campos
I made a demo in stackblitz to be clear: https://stackblitz.com/edit/angular-tjnvgd
– André Roggeri Campos
Thanks for the help and attention.. It worked.. I was wrong to put the class name as tag, actually the tag name is the "selector".
– Angular Man
Arrange, if the answer has solved your question, mark the answer as correct right above.
– André Roggeri Campos