-
Notifications
You must be signed in to change notification settings - Fork 1
angular location
sinsunsan edited this page Nov 28, 2014
·
13 revisions
www.mydomain.com/search?color=blue#apple
Server side
- www subdomain
- mydomain domain
- com extension
- /search path
- ?color=blue search query
Client side
- #apple anchor link
// Hashbang for SEO
angular.module('awesomeModule')
.config(['$locationProvider',
function($locationProvider) {
$locationProvider.hashPrefix("!");
}Just a clarification # is the default
$locationProvider.hashPrefix("!");
add a ! the # the default so make #!
This url type
http://mgcrea.github.io/angular-strap/##scrollspy
are set with
$locationProvider.hashPrefix("#");
# is the default, angular need at least # to identify deep linking part of the url
#! is the recommanded pattern named "hash bang"
To configure it this line is necessary in the above code
$locationProvider.hashPrefix("!");