angularjs - ASP.NET MVC View not rendering with layout after form post using angular -
i'm routing views using ngroute , not having particular issues rendering views. problem having when post method , passing list view.
site/page renders view no layout. typing address bar http://localhost:7351/page works , provides layout no view. if post form in http://localhost:7351/main browser url changes http://localhost:7351/site/page , displays results without layout.
form in view main
<form method="post" action="site/page"> <input id="chk_main" type="checkbox" /> <input type=submit> </form>
routeconfig
routes.maproute( name: "page", url: "site/page", defaults: new { controller = "site", action = "page" } );
edit: if change "url: site/page" "url: page" layout show, view won't.
controller
public actionresult index() { return view(); } public actionresult main() { return view(persons); } [httppost] public actionresult page() { return view(); }
angular route provider:
$routeprovider. when('/main', { templateurl: 'site/main' }) .when('/contact', { templateurl: 'site/contact' }) .when('/page', { templateurl: 'site/page' })
is there i'm missing or don't understand.
Comments
Post a Comment