mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-29 02:29:20 +01:00
Remove window.app
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
window.app = angular.module('mean', ['ngCookies', 'ngResource', 'ui.bootstrap', 'ui.route', 'mean.system', 'mean.articles']);
|
||||
angular.module('mean', ['ngCookies', 'ngResource', 'ui.bootstrap', 'ui.route', 'mean.system', 'mean.articles']);
|
||||
|
||||
angular.module('mean.system', []);
|
||||
angular.module('mean.articles', []);
|
||||
@@ -1,5 +1,5 @@
|
||||
//Setting up route
|
||||
window.app.config(['$routeProvider',
|
||||
angular.module('mean').config(['$routeProvider',
|
||||
function($routeProvider) {
|
||||
$routeProvider.
|
||||
when('/articles', {
|
||||
@@ -24,7 +24,7 @@ window.app.config(['$routeProvider',
|
||||
]);
|
||||
|
||||
//Setting HTML5 Location Mode
|
||||
window.app.config(['$locationProvider',
|
||||
angular.module('mean').config(['$locationProvider',
|
||||
function($locationProvider) {
|
||||
$locationProvider.hashPrefix("!");
|
||||
}
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
window.bootstrap = function() {
|
||||
angular.bootstrap(document, ['mean']);
|
||||
};
|
||||
|
||||
window.init = function() {
|
||||
window.bootstrap();
|
||||
};
|
||||
|
||||
angular.element(document).ready(function() {
|
||||
//Fixing facebook bug with redirect
|
||||
if (window.location.hash == "#_=_") window.location.hash = "";
|
||||
|
||||
//Then init the app
|
||||
window.init();
|
||||
angular.bootstrap(document, ['mean']);
|
||||
});
|
||||
@@ -1,9 +1,12 @@
|
||||
angular.module('mean.system').factory("Global", [function() {
|
||||
var _this = this;
|
||||
_this._data = {
|
||||
user: window.user,
|
||||
authenticated: !! window.user
|
||||
};
|
||||
//Global service for global variables
|
||||
angular.module('mean.system').factory("Global", [
|
||||
function() {
|
||||
var _this = this;
|
||||
_this._data = {
|
||||
user: window.user,
|
||||
authenticated: !! window.user
|
||||
};
|
||||
|
||||
return _this._data;
|
||||
}]);
|
||||
return _this._data;
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user