When you go by url, angular displays the desired template, but at the same time updates the entire page.

<a class="btn btn-mini animation" ng-click="locateTo($event, data)"> <!--<i style="margin-left: 4px; margin-right: 2px" class="fa fa-caret-right" ng-hide="data.hasChilds"></i>--> <span>{{data.title}}</span> </a> 
 $scope.locateTo = function (event, data) { if(!data.select) { data.select = true; if($state.current.name === "graphics" && data.type !== 90) { $state.go("counters", { counterName: "readings", placetype: data.type, placeid: data.id }); } else { $state.go($state.current.name, { placetype: data.type, placeid: data.id }); } } // $location.path(getCurrentTab + '/' + id); }; 

    2 answers 2

    Try

     $event.preventDefault(); 
    • and how can he help here? a even have no href - Grundy
    • @ Grundy, I suspect it is being added .. - Qwertiy

    Out of habit, I always put up href links in tags with no value, something like this:

     <a href ng-click="foobar()">link text</a> 

    It may help.

    • one
      Something is doubtful that it will help. - Qwertiy