WIP Domain listing app with automatic status checking. Buitl with AngularJS.

userData.js 458B

1234567891011121314151617181920212223
  1. "use strict"
  2. angular.module('domainManagerApp.userData', [])
  3. .service('UserData', [ '$rootScope', function($rootScope) {
  4. var user = '';
  5. var isAuthenticated = "";
  6. this.set = function(value1, value2) {
  7. user = value1;
  8. isAuthenticated = value2;
  9. $rootScope.$broadcast('user:isAuthenticated', isAuthenticated);
  10. }
  11. this.isAuthenticated = function() {
  12. return isAuthenticated;
  13. }
  14. this.getUser = function() {
  15. return user;
  16. }
  17. }]);