Skip to content

Instantly share code, notes, and snippets.

@jeef3
Created January 15, 2015 22:08
Show Gist options
  • Save jeef3/d9a4e46f1342448b6d05 to your computer and use it in GitHub Desktop.
Save jeef3/d9a4e46f1342448b6d05 to your computer and use it in GitHub Desktop.
'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');
'use strict';
module.exports = require('angular')
.module('myApp')
.controller('SessionExpiredCtrl', require('./session-expired.controller'))
.service('Session', require('./session'))
.service('SessionHandler', require('./session-handler'));
'use strict';
module.exports = function SessionHandler($rootScope, Session, User) {
this.sessionExpired = function (username) {
User.name = username;
$rootScope.$broadcast('session-expired');
Session.expired();
};
};
@jeef3
Copy link
Author

jeef3 commented Jan 15, 2015

index.js is ./session/index.js and session-handler.js is ./session/session-handler.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment