I want to pass dynamic url to flow-init's target property. the URL was generated at runtime.
If I assign a scope object which contains the properties for flow-ini. Then it return parse error.
I had the same issue:
flow-init="{target: baseUrl + 'some_url_location/another_url_location/{{entityID}}/'}"
and changed to
flow-init="{target: baseUrl + 'some_url_location/another_url_location/' + entityID + '/'}"
where entityID is $scope.entityID in my js controller. This $scope.entityID is taken from the current URL.
In your controller create a function to the scope taking the $flow variable and setting it's target to your dynamic url, also use the $flow.upload function here:
$scope.submitFlow = function($flow) {
$flow.opts.target = '/user/'+ $scope.user.id +'/submit-file';
$flow.upload();
};
Then in your html, in the flow-init div, set the flow-files-submitted to our function:
<div flow-init
flow-files-submitted="submitFlow($flow)"
flow-file-success="$file.msg = $message">