Sombir,

What you will need to do is create a new folder in your site root.  I call
mine "Asset."  It is within this folder that your HTML templates will go.
 Just to be clear, these should simple HTML, not Razor, for reasons
described above.

Next, add an IgnoreRoute() to your RoutingConfig for this folder.  This
will stop MVC from thinking that you are requesting an action, and simply
serve your request as content, instead.

For more, check out
asp.net+mvc+routing<https://groups.google.com/forum/#!searchin/angular/asp.net$20mvc$20routing>
on
this group, most recently How to use ASP.NET MVC and AngularJS
routing?<https://groups.google.com/forum/#!searchin/angular/mvc$20routing/angular/d4lvIcbL9f4/yft8hdSLO8MJ>.
 There is a lot of helpful information very close by.

Best,
SS


On Sun, May 25, 2014 at 6:37 AM, Sombir Verma <[email protected]> wrote:

> Thanks Steven,
> but, Actually I want to load partial view with angular where no action
> method is there for that partial view. Would you please help me in this
> case ?
>
> On Friday, 23 May 2014 20:52:07 UTC+5:30, steven smock wrote:
>>
>> What happens?  Does it fail to load anything at all?  Are there any
>> errors thrown?
>>
>> As I understand it, .cshtml with Razor will only help you when it is
>> called via an MVC GET action that returns it as a "rendered" view.
>>
>> Can you try specifying the URL of the action instead, i.e.
>> /MyController/MyView, instead of /Views/MyController/MyView.cshtml?
>>
>> On Friday, May 23, 2014 1:54:21 AM UTC-4, Sombir Verma wrote:
>>>
>>>
>>>   Is angular routing template url support for .cshtml file in ASP.Net
>>> MVC 4 Project ?
>>>
>>>    if yes then please guide. because when I use html page or .aspx page
>>> it load that page but when I use .cshtml page it is not loading the view.
>>>
>>>    Thanks in advance :)
>>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/pzjrfKVsV_0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to