Imagine an application has a List page, such as a table showing a list of users. There is a button on each row of the table called \"Edit\", and when this is clicked, a righ
In any way you solve this problem, just make sure that in your .run section on the angular app you declare something like this:
angular.module('yourApp', ['ui.router'])
.run(
['$rootScope', '$state', '$stateParams',
function ($rootScope, $state, $stateParams){
$rootScope.$state = $state;
$rootScope.$stateParams = $stateParams;
}
]
)
Otherwise neither $state, nor $stateParams will be accesible from the internal templates. Figured it out reading the ui-router docs and checking the example app's code, just after banging my head against the keyboard because this wasn't working.