NenadP
NenadP

Reputation: 647

AngularJS parsing expression in form tag fails

Is there any reason why expression is not parsed inside a form tag ?

Outside scope and inside of a form, serviceUrl parses ok, but refuses to render inside form tag (just renders literally '%7B%7B%20serviceUrl%20%7D%7D').

{{ serviceUrl }}

<form name="form" action="{{ serviceUrl }}" target="target_frame" method="POST" enctype="multipart/form-data">

    {{ serviceUrl }}

</form>

Upvotes: 0

Views: 130

Answers (1)

NenadP
NenadP

Reputation: 647

It was security issue in newer Angular version (1.2.7), indeed as gustavohenke suggested it needed using ng-attr-action = "{{ serviceUrl }}"

and in controller

$scope.serviceUrl = $sce.trustAsResourceUrl("http://yoururl");

Upvotes: 1

Related Questions