0
Good afternoon, you guys....
angular
I would like your help if possible.
I’m having trouble using a directive. We created a directive in a directive directory, (app> Directive) but within my form I am unable to use it. We have 2 directories (company and subsidiary) only company can use the resource of this directive. No error in the module company.module or affiliate.module, but it spits out an error in the console and does not load the page.
This is the mistake: Compiler.js:485 Uncaught Error: Type Istmaskdirective is part of the declarations of 2 modules: Empresamodule and Filialmodule! Please consider Moving Istmaskdirective to a Higher module that Imports Empresamodule and Filialmodule. You can also create a new Ngmodule that Exports and includes Istmaskdirective then import that Ngmodule in Empresamodule and Filialmodule.
The directive stops working when we have a few more directories inside. Ex: Stayed in these Directive: app directories> Directive> myDirectionCnpj. File that calls the directive was in: app> affiliate> affiliate-form. But the funny thing is that when I use the directive in the directory: app> affiliate it works and I can use in affiliate and company, for example
– Katho
Access this link that should solve your problem :) https://stackoverflow.com/questions/43598311/component-is-part-of-the-declaration-of-2-modules
– Jorge.M