<!doctype html> <html ng-app="myApp"> <head> <script src="lib/Angular/angular.js"></script> <script src="lib/Angular/angular-route.min.js"></script> <script> var app = angular.module( "myApp", [] ); app.controller("AppController", function( $location,$scope ) { $location.path("/oldpath"); $scope.getLocation=function(){ $location.path("/Newpath"); }; }); </script> </head> <body > <div ng-controller="AppController"> {{getLocation()}} </div> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more