Did you use ng-view in your index.html file?  Then you can see the XHR call 
in the browser's developer tools to verify the path being called to load 
the template.



On Saturday, March 15, 2014 10:35:59 PM UTC-6, Rupam Dutta wrote:
>
> Hi folks,
>
> I am stuck in a very basic area. I was just building few Views (simple 
> html files) having different functionality with almost every file pointing 
> to AngularJs library.
> My html files are located under "Views" folder and angular js files (main 
> and route) under "Scripts" folder. The entire stuff is developed under 
> Dotnet MVC4 project.
> Every file is working FINE in such scenario when I am running the Dotnet 
> application.
>
> Now my requirement got changed to bring out the entire project from Dotnet 
> MVC4 and just keeping only Views and Scripts without any other Dotnet 
> dependencies.
> So, surprisingly after pulling out the Views and Scripts and I attempted 
> to run those individually, every html executed perfectly with angular 
> implementations.
> But, wherever there is ng-route dependency and logic is written to route 
> the current html to another html, that redirection is NOT happening at all.
>
> I am attaching a sample routing code herein below which is pretty simple:
>
>         myApp.config(function ($routeProvider) {
>             $routeProvider
>                 .when('/view1',
>                 {
>                     controller: 'FirstController',
>                     templateUrl: '../Views/Test1.html'
>                 })
>                 .when('/view2',
>                 {
>                     controller: 'FirstController',
>                     templateUrl: '../Views/Test2.html'
>                 })
>                 .otherwise(
>                 {
>                     redirectTo: '/view1'
>                 });
>         });
>
> Test1.html and Test2.html contains simple text like Test1 and Test2, 
> nothing else.
>
> I hope I could make myself clear on my issue. Any suggestions and advice 
> will be helpful for me. Looking forward.
>
>
> Thanks,
> Rupam.
>

-- 
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