我有表格
<form name="form" ng-submit="submit()" action="<?php echo Route::get('auth'); ?>" ng-controller="LoginCtrl">
<!-- the rest -->
</form>
和coffeescript部分
app.controller 'LoginCtrl', ($scope) ->
$scope.submit = (where) ->
# want to the get the form action here
是否有任何“角度”方式来获取表单DOM元素或表单的操作。我无法对Javascript文件中的操作进行硬编码,因为它会根据当前的uri而更改。
答案 0 :(得分:0)
Angular不支持它,因为我正在使用jQuery,我只是按id选择表单...太糟糕了AngularJS没有将元素传递给控制器,仅用于指令。