我是Angular的新手,有一些问题......请帮助。 Ng-view不会渲染模板。我的代码:
的HomeController
public ActionResult Index()
{
var viewModel = new Model();
return View(viewModel);
}
_layout
<div class="container body-content" ng-view>
@RenderBody()
</div>
ng-app已添加到<html>
APP-route.js
(function () {
'use strict';
formsWorkflowApp.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when("/", {
templateUrl: "Home/Index",
controller: "HomeController"
})
.when("/Form/SearchResults", {
templateUrl: "Form/SearchResults",
controller: "SearchController"
})
.otherwise({
redirectTo: "/"
});
}]);
}());
有什么问题?