AngularJS supports modular approach. Modules are used to separate logic such as services, controllers, application etc. from the code and maintain the code clean. We define modules in separate js files and name them as per the module.js file. In the following example, we are going to create two modules:
Application Module - used to initialize an application with controller(s).
Controller Module - used to define the controller.
Application Module - used to initialize an application with controller(s).
Controller Module - used to define the controller.
No comments:
Post a Comment