mirror of
				https://github.com/mmumshad/ansible-playable.git
				synced 2025-03-09 23:38:54 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			821 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			821 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 'use strict';
 | |
| 
 | |
| import angular from 'angular';
 | |
| import constants from '../../app/app.constants';
 | |
| import util from '../util/util.module';
 | |
| import ngCookies from 'angular-cookies';
 | |
| import {
 | |
|   authInterceptor
 | |
| } from './interceptor.service';
 | |
| import {
 | |
|   routerDecorator
 | |
| } from './router.decorator';
 | |
| import {
 | |
|   AuthService
 | |
| } from './auth.service';
 | |
| import {
 | |
|   UserResource
 | |
| } from './user.service';
 | |
| 
 | |
| import uiRouter from 'angular-ui-router';
 | |
| 
 | |
| function addInterceptor($httpProvider) {
 | |
|   'ngInject';
 | |
| 
 | |
|   $httpProvider.interceptors.push('authInterceptor');
 | |
| }
 | |
| 
 | |
| export default angular.module('app2App.auth', [constants, util, ngCookies, uiRouter])
 | |
|   .factory('authInterceptor', authInterceptor)
 | |
|   .run(routerDecorator)
 | |
|   .factory('Auth', AuthService)
 | |
|   .factory('User', UserResource)
 | |
|   .config(['$httpProvider', addInterceptor])
 | |
|   .name;
 |