I have a template like this:
<div><form id="appForm" method="POST" action="{{form.formActionAttr}}">
            <table class="form-table">
                <tr>
                    <td>
                        <input name="input1" type="hidden" value="{{form.input1}}"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input name="input2" type="hidden" value="{{form.input2}}"/>
                    </td>
                </tr>
            </table>
        </form></div>
here is the controller:
function SamlFormController($scope, $sce, metadataService) {
    $scope.form = {};
    $scope.form.formActionAttr = $sce.trustAsResourceUrl('some.url');
    $scope.form.input1 = 'input1';
    $scope.form.input2 = 'input2';
    $scope.submitForm = function() {
        document.getElementById('appForm').submit();
    };
    $scope.submitForm();
}
Here is my intention: the controller run the submitForm() method, which send a HTTP POST request to the form.formActionAttr url.
But with the codes above, the action="{{form.formActionAttr}}" is not populated yet when the $scope.submitForm() is called.
How do I fix this issue?
Thanks in advance :-)


nameattribute. If you set thename, it will be available on the scope under that property.