Update UI-Router
This updates UI-Router to the most recent release. angular-ui-router for Angular v1 is now published as @uirouter/angularjs, so change the name to that. This commit also changes the obsolete stateChange* methods to transitions, so that the navbar will continue to work. Task: 3247 Change-Id: Ic800f437ca4412241bb3edb8a680f7e2e23beb9c
This commit is contained in:
parent
c5829bc593
commit
d3eea8f92b
@ -63,6 +63,7 @@
|
||||
"selenium-standalone": "2.43.1-2.9.0-1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@uirouter/angularjs": "^1.0.12",
|
||||
"angular": "1.5.8",
|
||||
"angular-cache": "https://github.com/jmdobry/angular-cache/archive/3.2.5.tar.gz",
|
||||
"angular-elastic": "https://github.com/monospaced/angular-elastic/archive/v2.4.2.tar.gz",
|
||||
@ -73,7 +74,6 @@
|
||||
"angular-sanitize": "1.5.8",
|
||||
"angular-scenario": "1.5.8",
|
||||
"angular-bootstrap": "0.12.2",
|
||||
"angular-ui-router": "0.2.13",
|
||||
"angularjs-viewhead": "0.0.1",
|
||||
"bootstrap": "3.3.7",
|
||||
"font-awesome": "4.5.0",
|
||||
|
@ -19,7 +19,7 @@
|
||||
* sets global scope variable accordingly.
|
||||
*/
|
||||
angular.module('storyboard').controller('ApplicationController',
|
||||
function ($scope, $state, $rootScope) {
|
||||
function ($scope, $state, $rootScope, $transitions) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
@ -46,7 +46,7 @@ angular.module('storyboard').controller('ApplicationController',
|
||||
* Listen to changes in the state machine to trigger our submenu
|
||||
* scan.
|
||||
*/
|
||||
$rootScope.$on('$stateChangeSuccess',
|
||||
$transitions.onSuccess({},
|
||||
function () {
|
||||
$scope.hasSubmenu = hasSubmenu($state.$current);
|
||||
});
|
||||
|
@ -22,7 +22,7 @@
|
||||
* @author Michael Krotscheck
|
||||
*/
|
||||
angular.module('sb.util').directive('activePath',
|
||||
function ($location, $rootScope) {
|
||||
function ($location, $rootScope, $transitions) {
|
||||
'use strict';
|
||||
|
||||
return {
|
||||
@ -40,7 +40,12 @@ angular.module('sb.util').directive('activePath',
|
||||
// binding will return a function that will disconnect
|
||||
// that binding.
|
||||
var disconnectBinding =
|
||||
$rootScope.$on('$stateChangeSuccess', setActivePath);
|
||||
$transitions.onSuccess({}, function setActivePath() {
|
||||
var path = $location.path();
|
||||
var isMatchedPath = path.match(activePath) !== null;
|
||||
|
||||
element.toggleClass('active', isMatchedPath);
|
||||
});
|
||||
$scope.$on('$destroy', disconnectBinding);
|
||||
|
||||
// INIT
|
||||
|
@ -31,7 +31,7 @@
|
||||
<script src="angular/angular.js"></script>
|
||||
<script src="angular-elastic/elastic.js"></script>
|
||||
<script src="angular-bootstrap/ui-bootstrap-tpls.js"></script>
|
||||
<script src="angular-ui-router/release/angular-ui-router.js"></script>
|
||||
<script src="@uirouter/angularjs/release/angular-ui-router.js"></script>
|
||||
<script src="angular-resource/angular-resource.js"></script>
|
||||
<script src="angular-local-storage/dist/angular-local-storage.js"></script>
|
||||
<script src="angular-sanitize/angular-sanitize.js"></script>
|
||||
|
20
yarn.lock
20
yarn.lock
@ -2,6 +2,16 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@uirouter/angularjs@^1.0.12":
|
||||
version "1.0.12"
|
||||
resolved "https://registry.yarnpkg.com/@uirouter/angularjs/-/angularjs-1.0.12.tgz#b2275b7e33e0024a485f96568a18d350539880f3"
|
||||
dependencies:
|
||||
"@uirouter/core" "5.0.13"
|
||||
|
||||
"@uirouter/core@5.0.13":
|
||||
version "5.0.13"
|
||||
resolved "https://registry.yarnpkg.com/@uirouter/core/-/core-5.0.13.tgz#e1b31626c393cbdd82651755ff1ce3fc55163fd0"
|
||||
|
||||
abbrev@1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
||||
@ -122,18 +132,10 @@ angular-scenario@1.5.8:
|
||||
version "0.12.0"
|
||||
resolved "https://github.com/angular-ui/bootstrap/archive/0.12.0.tar.gz#479e5c7d9ef75d6133f68143b96948f8e77136b2"
|
||||
|
||||
angular-ui-router@0.2.13:
|
||||
version "0.2.13"
|
||||
resolved "https://registry.yarnpkg.com/angular-ui-router/-/angular-ui-router-0.2.13.tgz#ab40c2f9fef9b8626ffdb29a793426c1fedd2f29"
|
||||
|
||||
angular@1.5.8:
|
||||
angular@1.5.8, angular@>=1.0.6:
|
||||
version "1.5.8"
|
||||
resolved "https://registry.yarnpkg.com/angular/-/angular-1.5.8.tgz#925a5392b8c212d09572dc446db7e01264e094cb"
|
||||
|
||||
angular@>=1.0.6:
|
||||
version "1.6.7"
|
||||
resolved "https://registry.yarnpkg.com/angular/-/angular-1.6.7.tgz#0f89837dae1776b01ccb1fa2096db0d9373d9897"
|
||||
|
||||
angularjs-viewhead@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/angularjs-viewhead/-/angularjs-viewhead-0.0.1.tgz#31a3b0dd837eecf0bb5a7da22b6561431251c6df"
|
||||
|
Loading…
x
Reference in New Issue
Block a user