Skip to content Skip to sidebar Skip to footer

Base Href And Angular Routing And Views

I'm developing a web application which defines the in the header as explained in this article. The default URL that is mapped is http://localhost/phoen

Solution 1:

Removing the slash from the views

app.config(["$routeProvider", function ($routeProvider) {
    $routeProvider.when('/login', {
        templateUrl: 'views/login.html',
       controller: 'LoginCtrl'
    });
}]);

and making links like:

<ahref="login">Login</a>

but leaving the slash for the route resolved the problem.

Post a Comment for "Base Href And Angular Routing And Views"