Hi,
In one of the cases, I have a createModal and editModal. They both share the same form. So I thought of grouping the form in one single cshtml and load it inside both modals with:
<div ng-include="/App/tenant/views/refdata//createOrEditModal.cshtml" />
I can see with the Google Chrome developer tools that there is no request to server to bring in the cshtml file.
I've done this before outside this framework and works well.
Any idea?
Regards Bilal
4 Answer(s)
-
0
Even with this, it doesn't work:
<div ng-include src="/App/tenant/views/refdata//createOrEditModal.cshtml" />
-
0
Hi,
Do you have an exception message ? I'm not sure this works on *.cshtml files, can you first try with a dummy *.html file ?
-
0
No exceptions are generated.
Also, looking at Chrome Developer Tools, no request is sent to server.
I tried with .html and same issue.
Can you try it at your end?
Regards Bilal
-
0
Seems the ng-include is failing silently with no hope to make it work.
However, with MVC, I could do something like this given I am using .cshtml views for Angular:
@Html.Partial("~/App/tenant/views/refdata/shelters/_createOrEditModal.cshtml")
This works perfect.
Question, can you please tell me, how does Angular capture a request for .cshtml (how does it deal with it) and how is i tbeing served on server? Maybe some references in the source code to look at and see how it works.
Regards Bilal