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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -