Execute
<!DOCTYPE html> <html> <head> <title>Wikitechy AngularJS Tutorials</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"> </script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-route.js"></script> </head> <body ng-app="myApp"> <p><a href="#">Tutorials</a></p> <a href="#html">HTML</a> <a href="#css">CSS</a> <a href="#php">PHP</a> <div ng-view></div> <script> var app = angular.module("myApp", ["ngRoute"]); app.config(function($routeProvider) { $routeProvider .when("", { templateUrl : "tutorials.html" }) .when("/html", { templateUrl : "html.html" }) .when("/css", { templateUrl : "css.html" }) .when("/php", { templateUrl : "php.html" }); }); </script> </body> </html>
www.wikitechy.com © Copyright 2016. All Rights Reserved.