redirect - AngularJS - direct access to url with hash -


i'm developing webapp using angularjs , laravel.

when navigate through url , links in app works fine, if type url directly in browser, strange happens.

for example, if type http://myapp.dev/#/customers redirected http://myapp.dev/customers#/

why? what's wrong? laravel executes "/" route (right) , angular "/" route (right, again).

note: have made test application similar first without using laravel , .htaccess (it serves static html) , haven't issue, can access url directly.

thank you.

edit - here angular routing code:

 var app = angular.module('factotum', ['ngresource']);  function approuteconfig($routeprovider) {     $routeprovider.      when('/', {         controller: indicecontroller,         templateurl: 'v/indice'     }).     when('/login', {         controller: 'appcontroller',         templateurl: 'v/login'     }).     when('/logout', {         controller: 'appcontroller',         templateurl: 'v/login'     }).     // ---- clienti     when('/clienti', {         controller: clienticontroller,         templateurl: 'v/clienti/lista'     }).     when('/clienti/nuovo', {         controller: clienticontroller,         templateurl: 'v/clienti/nuovo'     }).     when('/clienti/modifica/:id', {         controller: clienticontroller,         templateurl: 'v/clienti/modifica'     }).     // ---- progetti     when('/progetti', {         controller: progetticontroller,         templateurl: 'v/progetti/lista'     }).     when('/progetti/nuovo', {         controller: progetticontroller,         templateurl: 'v/progetti/nuovo'     }).     otherwise({         redirectto: '/'     }); } // factotumrouteconfig  app.config(approuteconfig); 

finally found problem. i'm using free html5 template (charisma usman - here demo: http://usman.it/themes/charisma/), includes jquery history plugin. removed plugin, along initialization code, , working expected. fault, didn't inspect code carefully.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -