angularjs - angular usage of $location in directive repaints all other directives -


i have page uses several directives:

<section class="start_page page--no-vcenter">         <u-search>             <u-search-form></u-search-form>             <u-news-form></u-news-form>             <u-search-pane></u-search-pane>         </u-search>         <u-news>             <u-news-pane></u-news-pane>         </u-news>     </u-search> </section> 

when use service uses $location , sets search() parameters inside of 1 of directives directives repaint.

return $location.search(obj); 

how can avoid repainting of other directives?

im using angular 1.2.28.

the solution quite simple since updating search() part, resp. query params.

here can use

$routeprovider.when('/somewhere', {     controller: 'somectrl',     reloadonsearch: false }) 

when changing path more complicated, guess.

the issue on github this: https://github.com/angular/angular.js/issues/1699

and solution found in answer: https://stackoverflow.com/a/17606908/541949


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -