routeprovider in angularjs get in controller current and previous code example
Example: ngroute in angularjs
"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-route.js"
"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-route.js"