Application main controller
The first module in our AngularJS application declares the name of the application. The following is the declaration in the file: src/main/webapp/app/controllers/main.js
:
var myApp = angular.module('app', ['ui.bootstrap', 'newcaserecord','newtask', 'sharedService', 'isoCountries']);
The framework exports a function object called angular
, and it has a method called module
that defines a module. The first argument is the name of the module and the second argument is an array of the dependent module names. The module()
method returns an AngularJS module object to the caller. From there, we declare the initial controller.
The module ui.bootstrap
contains AngularJS and Bootstrap integrations. The module newcaserecord
is part of the caseworker application and defines a controller, which inserts and amends the master records. The module newtask
defines a controller, which inserts, amends, and removes the details records. The sharedService
defines a factory provider that...