Quantcast
Viewing all articles
Browse latest Browse all 11

Answer by vijay for AngularJS routing without the hash '#'

Lets write answer that looks simple and short

In Router at end add html5Mode(true);

app.config(function($routeProvider,$locationProvider) {    $routeProvider.when('/home', {        templateUrl:'/html/home.html'    });    $locationProvider.html5Mode(true);})

In html head add base tag

<html><head><meta charset="utf-8">    <base href="/"></head>

thanks To @plus- for detailing the above answer


Viewing all articles
Browse latest Browse all 11

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>