angularjs - How to navigate on button click -
angularjs - How to navigate on button click -
i have button in anuglarjs , have bind property contains url. when click button error.
error: [$parse:syntax] syntax error: token 'vm.achreportpath' unexpected, expecting [:] @ column 3 of look [{{vm.achreportpath}}] starting @ [vm.achreportpath}}].
<button class="btn btn-default" id="searchformbtn" data-ng-click="{{vm.achreportpath}}" type="submit" tabindex="5">view report</button> $scope.vm.achreportpath = "www.google.com"
please guide me doing wrong.
replace
data-ng-click="{{vm.achreportpath}}"
with
href="{{vm.achreportpath}}"
if dont have "http://"
href="http://{{vm.achreportpath}}"
angularjs angularjs-scope
Comments
Post a Comment