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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -