2
By default Angularjs formats the URL as follows:
http://dominio.com.br/#/login
How do I leave it this way?
http://dominio.com.br/login
2
By default Angularjs formats the URL as follows:
http://dominio.com.br/#/login
How do I leave it this way?
http://dominio.com.br/login
3
It’s two very simple steps:
$locationProvider
angular.module('app', [])
.config(function($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl : 'home.html',
controller : homeController
})
.when('/sobre', {
templateUrl : 'sobre.html',
controller : sobreController
});
// habilitar o uso da API HTML5 History
$locationProvider.html5Mode(true);
});
<html>
<head>
<base href="/">
</head>
Browser other questions tagged angularjs
You are not signed in. Login or sign up in order to post.