Click here to Skip to main content
15,789,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have been doing with ngRoute. I've SPA which having 2 tabs clicking on each tab we show partial as html, but I'm experiencing issue while navigating from one tab to another tab when use like below.
angular.module('sam',['ngRoute']).config(function($routeProvider){ $routeProvider.when('/main/customer',{ templateUrl:"customer.html", controller:"customerController" }) .when('/main/client',{ templateUrl:"client.html", controller:"clientController" }); });

the above line kept it as separate file called app.js, Here I use ASP.NET MVC as backend, so from index.cshtml I did like below
Customer Client
I am experiencing an issue with above coding. But in angular ngRoute the second / looks for routeParams???that's why I'm getting error??
Can anyone help me in this.
Kumarbs 6-May-15 0:54am    
Could you provide some detailed code, where you are getting the issue? If possible provide the detailed issue.
K K Srinivasan 11-May-15 7:54am    
Hi Kumbarbs,

Really thanks for your helping mind. Fortunately I was cleared the issue by myself. The real issue was routing mode such as Hashbang, HTML5. Since I don't want # in the URL.

When I used the below code the issue was resolved,

$locationProvider.html5Mode({enabled:true, requireBase:false});

But I'm in state of understanding how to give base url if we really want to use requireBase:true.

Can you help me into that?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900