更新我已经恢复到包含任何 ui-router 之前的状态
我遇到了一个我无法解决的可怕的 $injector 错误,我已经恢复了并且需要知道如何简单地包含 ui-router 并添加一个配置函数,该函数将简单地将用户路由到加载 /login 的 /login .html
我以前做过很多次,只是这次不行。
(function() { "use strict";
var app = angular.module('tickertags', [
'infinite-scroll',
'apiFactory',
'scopeFactory',
'tagFactory',
'tickerFactory',
'timeSpanFactory',
'overlayDirective',
'searchPopoverDirectives',
'notificationDirectives',
'platformHeaderDirectives',
'controlHeaderDirectives',
'viewHeaderDirectives',
'alertsPanelController',
'alertPanelDirectives',
'tickersPanelDirectives',
'tickersSelectFactory',
'tagsPanelDirectives',
'tagDetailsFactory',
'tagHoverDirective',
'tagSearchDirective',
'tagsFilterDirective',
'focusMeDirective',
'chartHeaderController',
'chartHeaderDirectives',
'chartPanelDirective',
'chartIQDirective',
'socialMediaController',
'socialMediaDirectives',
'socialMediaFactory'
])
.controller('DashCtrl', Controller);
/*
I WANT TO ADD THE CONFIG HERE...
/login = login.html
*/
Controller.$inject = [
'$scope',
'$rootScope',
'ScopeFactory',
'TickerFactory'];
function Controller($scope,
$rootScope,
ScopeFactory,
TickerFactory) {
/** Init DashCtrl scope */
/** ----------------------------------------------------------------- */
var vs = $scope;
vs.showNote = true,
vs.mouseX = '',
vs.mouseY = '';
ScopeFactory.saveScope('root', vs);
/** Detect if a tagHover has been shown and ready bodyClick to close */
vs.$on('tagHoverOpen', function(events,data) {
vs.bodyClick = function() {
$rootScope.$broadcast('bodyClick');
};
});
/** Remove eventListener after tagHover is closed */
vs.$on('destroy', function() {
vs.bodyClick = angular.noop();
});
/** Get and store all tickers, eventually just first 100 */
getAllTickers();
function getAllTickers() {
TickerFactory.getTickers();
};
};
})();