Here my MVC controller
- public ActionResult Index()
- {
- return View();
- }
- public ActionResult home()
- {
- return PartialView();
- }
- "viewport" content="width=device-width" />
-
Index - "myApp">
-
- var app = angular.module("myApp", ["ngRoute"])
- app.config(["$routeProvider", "$locationProvider", function ($routeProvider, $locationProvider) {
- $routeProvider.when('/home', {
- templateUrl: 'Home/home',
- controller: 'homecontroller'
- })
- .controller("homecontroller", function ($scope, $location) {
- $scope.message = "home controller";
- $scope.Name = "Junaid";
- })
- @{
- Layout = null;
- }
{{message}}
- "text" ng-model="Name" />
home page
If Iam wrong please correct me.Thnak you...


Hamid KhanRank #424 · 5.9K reputationPosted Sep 5, 2017, 11:30 PM EDT
Hamid KhanRank #424 · 5.9K reputationPosted Sep 5, 2017, 11:33 PM EDT
Junaid SyedRank #3,092 · 463 reputationPosted Sep 6, 2017, 12:32 AM EDT