Here i'm working with angular-routing in spring-boot+security application. When I use ui-sref to access a state defined in $stateProvider, the whole page get refresh. How can I stop refreshing and just append the url and view the template?
angularJS code:
myApp.config(function($stateProvider, $urlRouterProvider) {
// $urlRouterProvider.otherwise('/');
$stateProvider
.state('hi', {
url: '/hi/:id',
reloadOnSearch : false,
views :{
"properties" : {
templateUrl: "views/properties.html",
controller : function($scope,$stateParams){
//alert("hi");
}
}
}
});
});
HTML code:
<div class="col-md-7" ui-sref="hi ({Id: 1})">
<h5 class="widget-title smaller" >{{id.name}}</h5>
</div>