Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Online AngularJS Editor

<!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>
 

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.