New case record controller
We have placed the code to create and edit the case records in a separate file called newcaserecord-modal.js
, which contains the user-defined AngularJS module newcaserecord
. This module has dependencies on other modules, some of them mentioned before. The ui.bootstrap.modal
is a special module from the AngularJS UI Bootstrap third-party framework. The module defines the Bootstrap components written by the AngularJS team. In particular, it has a helpful modal dialog extension, which we use throughout the caseworker application.
The following is the shortened code for the newcaserecord
module and the NewCaseRecordModalController
:
var newcaserecord = angular.module('newcaserecord', ['ui.bootstrap.modal', 'sharedService','isoCountries']) newcaserecord.controller('NewCaseRecordModalController', function($scope, $modal, $http, $log, sharedService, isoCountries ) { $scope.caseRecord = { sex: "F", firstName: "", lastName: "", country: "", passportNo: "", dateOfBirth...