feat(router): Added method to get current instruction

This method delegates to the root router to get the current complete instruction.
This commit is contained in:
Brandon Roberts
2016-02-18 09:25:03 -06:00
committed by Vikram Subramanian
parent 15e16148f4
commit 6dce4f49c2
4 changed files with 81 additions and 16 deletions
+1 -1
View File
@@ -246,7 +246,7 @@
var paramsObj = {};
$rootScope.$on('$routeChangeSuccess', function () {
var newParams = $rootRouter._currentInstruction && $rootRouter._currentInstruction.component.params;
var newParams = $rootRouter.currentInstruction && $rootRouter.currentInstruction.component.params;
angular.forEach(paramsObj, function (val, name) {
delete paramsObj[name];