Created
January 15, 2015 22:08
-
-
Save jeef3/d9a4e46f1342448b6d05 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var angular = require('angular'); | |
angular.module('myApp', []); | |
// Compiled templates | |
require('templates'); | |
// Services | |
require('./user'); | |
// Components | |
require('../components/dialog'); | |
// App | |
require('./main'); | |
require('./session'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = require('angular') | |
.module('myApp') | |
.controller('SessionExpiredCtrl', require('./session-expired.controller')) | |
.service('Session', require('./session')) | |
.service('SessionHandler', require('./session-handler')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function SessionHandler($rootScope, Session, User) { | |
this.sessionExpired = function (username) { | |
User.name = username; | |
$rootScope.$broadcast('session-expired'); | |
Session.expired(); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
index.js
is./session/index.js
andsession-handler.js
is./session/session-handler.js