angularjs - Angular Ui router - parameters disappearing from URL when anything on page causes a digest -
i have strange problem ui-router. have stripped code relating ui-router page, remains config code...
app.config(function ($stateprovider, $uiviewscrollprovider, $urlrouterprovider, $locationprovider, appconfig) { 'use strict'; $urlrouterprovider.otherwise("/search"); $stateprovider .state('search', { url: "/search?locationtext?&method?&page?", templateurl: "templates/searchresults.tpl.html", controller: 'searchresultsctrl searchresults', reloadonsearch : false }) });
so, when go url domain.com/page automatically changes url domain.com/page#/search want do.
unfortunately when click on on page triggers digest cycle (e.g. open modal, click menu item) after # disappears url, bizarre.
no other code in app router. code on page runs when click doing entirely unrelated routing. has seen before?
as charlietfl pointed out in comments, using ng-click on hash still overwriting url whenever clicked on anything. hate web development.
Comments
Post a Comment