diff --git a/.npmignore b/.npmignore index 121ef01..9daeafb 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1 @@ test -src diff --git a/package.json b/package.json index fb125ed..0ca6e21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redux-ui-router", - "version": "0.4.4", + "version": "0.5.0", "description": "Redux middleware for use with Angular UI Router", "main": "./lib/index.js", "scripts": { @@ -17,14 +17,12 @@ "author": "Neil Fenton (neilff)", "license": "ISC", "dependencies": { - "babel": "5.8.21", - "redux": "3.0.0", - "redux-actions": "^0.8.0" + "redux": "^3.0.0" }, "devDependencies": { + "babel": "5.8.21", "babel-core": "5.6.15", "babel-eslint": "3.1.20", - "babel-loader": "5.3.1", "chai": "3.0.0", "eslint": "0.24.0", "mocha": "2.2.5", @@ -34,7 +32,7 @@ "sinon-as-promised": "4.0.0" }, "peerDependencies": { - "angular": "1.4.x", + "angular": "^1.4.x", "angular-ui-router": "^0.2.15" } } diff --git a/src/router-listener.js b/src/router-listener.js index 9344f74..f23e799 100644 --- a/src/router-listener.js +++ b/src/router-listener.js @@ -10,11 +10,11 @@ export default function RouterListener($rootScope, $urlRouter, $stateParams, ngUiStateChangeActions) { $rootScope.$on('$stateChangeStart', ngUiStateChangeActions.onStateChangeStart); - $rootScope.$on('$locationChangeSuccess', () => { + $rootScope.$on('$stateChangeSuccess', () => { ngUiStateChangeActions.onStateChangeSuccess(); }); - const unsubcribeStateChangeListener = $rootScope.$on('$stateChangeSuccess', () => { + const unsubcribeStateChangeListener = $rootScope.$on('$locationChangeSuccess', () => { ngUiStateChangeActions.onStateChangeSuccess(); unsubcribeStateChangeListener(); });