Hello Arnaud, Thank you so much for your reply and explanation in detail as well. Please let me clear one more thing to you . Is it correct that all of a component's selector should be a unique name if we try to export from a module and use it in other components?
Best Regards, Marty Collins On Tue, Nov 24, 2020 at 10:01 PM Arnaud Deman <[email protected]> wrote: > Hello, > > > You could have a DepartmentModule in which the DepartmentComponent, > DepartmentModal and DepartmentTable are delcared. If DepartmentModal and > DepartmentTable are only used in DepartmentComponent, they don't have to be > exported in DepartmentModule, only DepartmentComponent has to be exported. > > In app.module you will have to import DepartementModule if it is used in > the app component. If it is used in another component you will have to > import in its corresponding module and not in the app.module. Otherwise if > it is associated to a route it can be - and should be - lazy loaded. > > Regards, > Arnaud. > > References: > Modules: https://angular.io/guide/architecture-modules > Lazy loading: https://angular.io/guide/lazy-loading-ngmodules > > On Tuesday, 24 November 2020 at 05:07:36 UTC+1 [email protected] wrote: > >> Hello all, >> >> I am new in angular and come from VueJS, i am a fuse confusing about >> registration components , >> >> Is it angular have only option that we can register all of created >> component in to app.module.ts as global with unique selector name >> >> any options i can register a couple of component in to specific component >> class like Vuejs. >> >> Let say , I have DepartmentComponent class as parent then i just want to >> register this tow child DepartmentModal and DepartmentTable without >> declarations in app.modules.js >> >> Thanks all >> > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/angular/52d1b77b-1ff0-430b-8754-42907452446dn%40googlegroups.com > <https://groups.google.com/d/msgid/angular/52d1b77b-1ff0-430b-8754-42907452446dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/CAJ7E3sc6CTMqSEW_FLZax3JThTRgxoE-uRT4TJ-KP%3DoeMtpn7w%40mail.gmail.com.
