<!doctype html> <table style="font-family: Arial"><tbody><tr><td colspan="2" class="header"> <h1> My Blog </h1> </td></tr><tr><td class="leftMenu"> <a href="#/home">Home</a> <a href="#/courses">Courses</a> <a href="#/students">Students</a> </td><td class="mainContent"> <ng-view> </td></tr><tr><td colspan="2" class="footer"> Website Footer </td></tr></tbody></table>
var app = angular .module("Demo", ["ngRoute"]) .config(function ($routeProvider) { $routeProvider .when("/home", { template : "Templates/home.html", controller: "homeController" }) .when("/courses", { templateUrl: "Templates/courses.html", controller: "coursesController" }) }); app.controller("homeController", function($scope) { $scope.message="Welcome Sunny"; }); app.controller("coursesController", function ($scope) { $scope.courses = ["C#", "VB.NET", "ASP.NET", "SQL Server"]; });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)