I would like to call the login function when I click the login button but keep getting the error message in the title. Can someone point out the error in my script?
To be callable from the view, a function must be in the $scope. Add
$scope.login = login;
to the JS code of the controller.
You also need to actually use that controller. Change
to This is all fundamental stuff. My advice would be to learn from an AngularJS tutorial before going further. 0 讨论(0) 查看其它8个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
to
This is all fundamental stuff. My advice would be to learn from an AngularJS tutorial before going further. 0 讨论(0) 查看其它8个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
This is all fundamental stuff. My advice would be to learn from an AngularJS tutorial before going further.