Skip to content
Permalink
Browse files

Add dependencies to app.config().

The code doesn't work in prod mode without these dependencies.

Also set 'ng-strict-di' so that this kind of error can be caught in dev mode

See this for more information:
https://stackoverflow.com/questions/32467677/angularjs-debugging-of-injectorunpr-unknown-provider-e
  • Loading branch information
r0bertz committed Mar 10, 2019
1 parent 65ae932 commit fe3ad6b3b0b77e41e8ecbd0b72de4ecec111bcdd
Showing with 4 additions and 3 deletions.
  1. +3 −2 src/js/entry/entry.js
  2. +1 −1 src/templates/index.jade
@@ -125,7 +125,8 @@ rippleclient.types = types;
rippleclient.tabs = {};
_.forEach(tabs, function(tab) { rippleclient.tabs[tab.tabName] = tab; });

app.config(function ($routeProvider, $locationProvider) {
app.config(['$routeProvider', '$locationProvider',
function ($routeProvider, $locationProvider) {
// Since AngularJS 1.6, the default hash-prefix used for $location hash-bang
// URLs has changed from the empty string ('') to the bang ('!'). To make old
// url (e.g. 'href="#/history') work, set hash prefix to empty string.
@@ -178,7 +179,7 @@ app.config(function ($routeProvider, $locationProvider) {
});

$routeProvider.otherwise({redirectTo: '/404'});
});
}]);

app.run(['$rootScope', '$route', '$routeParams', 'rpNW',
function ($rootScope, $route, $routeParams, rpNW)
@@ -13,7 +13,7 @@ html.no-js.lt-ie9(ng-app='rp', ng-controller='AppCtrl', ng-class='[$route.curren
html.no-js(ng-app='rp', ng-controller='AppCtrl', ng-class='[$route.current.tabClass, $route.current.pageMode]', lang='en')
<!--<![endif]-->

html(ng-app='rp', ng-controller='AppCtrl', ng-class='[$route.current.tabClass, $route.current.pageMode]')
html(ng-app='rp', ng-strict-di, ng-controller='AppCtrl', ng-class='[$route.current.tabClass, $route.current.pageMode]')
head
meta(charset='utf-8')
title Ripple Admin Console

0 comments on commit fe3ad6b

Please sign in to comment.
You can’t perform that action at this time.