You can also create a file that exports components, then you only have to 
import this one file.
By the way: Imports are not related to Angular. That's pure TypeScript. 
Imports are required for type checking and autocompletion and uniquely 
identify type names for building to JS.

On Sunday, March 13, 2016 at 2:50:07 AM UTC+1, Dave Abbott wrote:
>
> Following the Heros example / guide on the Angular 2 it has 2 basic 
> Components which simply get imported into the app.ts file.
>
> What about real world where you have possibly 100's of components, do you 
> have to list everyone in the app.ts / js file?
>
> What if we had HeroPowers, HeroBattles, HeroWeakness, HeroNemesis, 
> HeroOrigins, HeroShoeSize, HeroEyeColor , Enemies, EnemiesDetails,  yes I 
> know most these could all be in the HeroDetails but if say someone like me 
> wanted to know the answer to a real world question how would one do such a 
> crazy thing?
>
> Thanks all,
>
> Dave
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to