Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.js
- ------------------------------------------------------------------------------------------------------------
- (function () {
- angular.module('TSLEmployment', ['ui.bootstrap', 'ui.select', 'ngSanitize', 'ngStorage']);
- })();
- controller.js
- ------------------------------------------------------------------------------------------------------------
- (function () {
- 'use strict';
- angular.module('TSLEmployment')
- .controller('StandardAppCtrl', StandardAppCtrl);
- StandardAppCtrl.$inject = ['$location', 'GeneralRepo', '$localStorage', '$scope'];
- function StandardAppCtrl($location, GeneralRepo, localStorage, $scope) {
- var self = this;
- self.storage = localStorage;
- $scope.$watch(angular.bind(this, function (appForm) {
- return this.appForm;
- }), function (newVal, oldVal) {
- console.log(newVal);
- console.log('Test');
- self.storage.TSLApplicationData = newVal;
- });
- initialize();
- function initialize() {
- self.appForm = {};
- if (self.storage.TSLApplicationData)
- {
- if (self.storage.TSLApplicationData.isControlActCompliant) { self.appForm.isControlActCompliant = self.storage.TSLApplicationData.isControlActCompliant }
- }
- }
- }
- })();
- The HTML
- -------------------------------------------------------------------------------------------------------------
- <form name="appForm" class="standardAppForm">
- <div class="ApplicationHeader">Employment</div>
- <div class="row rowSpacer">
- <p class="col-sm-10 question">For purposes of compliance with the Immigration Reform and Control Act, are you legally entitled to work in the United States?</p>
- <div class="btn-group col-sm-2">
- <label class="btn btn-warning btn-yesOrNo" ng-model="ctrl.appForm.isControlActCompliant" btn-radio="true">Yes</label>
- <label class="btn btn-warning btn-yesOrNo" ng-model="ctrl.appForm.isControlActCompliant" btn-radio="false">No</label>
- </div>
- </div>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement