Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. app.js
  2. ------------------------------------------------------------------------------------------------------------
  3. (function () {
  4. angular.module('TSLEmployment', ['ui.bootstrap', 'ui.select', 'ngSanitize', 'ngStorage']);
  5. })();
  6.  
  7. controller.js
  8. ------------------------------------------------------------------------------------------------------------
  9. (function () {
  10. 'use strict';
  11.  
  12. angular.module('TSLEmployment')
  13. .controller('StandardAppCtrl', StandardAppCtrl);
  14.  
  15. StandardAppCtrl.$inject = ['$location', 'GeneralRepo', '$localStorage', '$scope'];
  16.  
  17. function StandardAppCtrl($location, GeneralRepo, localStorage, $scope) {
  18. var self = this;
  19.  
  20. self.storage = localStorage;
  21.  
  22. $scope.$watch(angular.bind(this, function (appForm) {
  23. return this.appForm;
  24. }), function (newVal, oldVal) {
  25. console.log(newVal);
  26. console.log('Test');
  27. self.storage.TSLApplicationData = newVal;
  28. });
  29.  
  30. initialize();
  31.  
  32. function initialize() {
  33. self.appForm = {};
  34. if (self.storage.TSLApplicationData)
  35. {
  36. if (self.storage.TSLApplicationData.isControlActCompliant) { self.appForm.isControlActCompliant = self.storage.TSLApplicationData.isControlActCompliant }
  37.  
  38. }
  39. }
  40. }
  41. })();
  42.  
  43. The HTML
  44. -------------------------------------------------------------------------------------------------------------
  45.  
  46. <form name="appForm" class="standardAppForm">
  47. <div class="ApplicationHeader">Employment</div>
  48. <div class="row rowSpacer">
  49. <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>
  50. <div class="btn-group col-sm-2">
  51. <label class="btn btn-warning btn-yesOrNo" ng-model="ctrl.appForm.isControlActCompliant" btn-radio="true">Yes</label>
  52. <label class="btn btn-warning btn-yesOrNo" ng-model="ctrl.appForm.isControlActCompliant" btn-radio="false">No</label>
  53. </div>
  54. </div>
  55. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement