arcee123 arcee123 - 6 months ago 125
AngularJS Question

how to migrate to angular rc6 ngModules

I'm going from RC4 to RC6. I'm trying to read's website, and some of the instructions are not clear for me.

I have a couple of basic questions, that I'm hoping for more clear answers to:

  1. If I have 15 components, what tells me that I need to split them among multiple ngModules?

  2. in RC4, I have directives, how do I know when to push them into either imports or declarations?

Thanks much


You don't necessarily have to turn each component into it's own module. If two components are closely related I would turn them into a module.

imports are used to include other modules in the current module.

declarations are used to declare all the components of the module.