javascript - Getting a # in URL from angularJS $stateProvider -


i getting strange # in middle of url example if try go localhost:8080 have angularjs app running redirected http://localhost:8080/#/home. don't understand # coming suspect has urls defining in $stateprovider.

here $stateprovider code:

//state handler //++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app.config([ '$stateprovider', '$urlrouterprovider', function($stateprovider, $urlrouterprovider) {      $stateprovider         .state('newalarm', {             url: '/newalarm',             views: {                 '': {templateurl: '/templates/newalarmpage.html'},                 'header@newalarm':{templateurl: '/templates/header.html'},                 'newalarmform@newalarm':{templateurl: '/templates/newalarmform.html'}             },             controller: 'newschedulectrl'         })          //to changed         .state('home', {             url: '/home',             views: {                 '': {templateurl: '/templates/homepage.html'},                 'header@home':{templateurl: '/templates/header.html'}             },             controller: ''         });     //end of changed     $urlrouterprovider.otherwise('home'); }]); 

any thoughts?

from wikipedia article on single page applications:

the page not reload @ point in process, nor control transfer page, although location hash can used provide perception , navigability of separate logical pages in application

use of hash enables angular (and other spa frameworks) route urls without reloading page.

related questions:


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -