I am trying to convert a hard code list of podio web forms inside of divs 
to a data driven list. I'm using ng-repeat, ng-src and {{ markup }} inside 
of javascript (which probably won't work). The select statement works 
perfectly. the ng-src and javascript fail miserably. Any help / knowledge 
about how this can be done is greatly appreciated

a single hard coded form would look like this

<div id="baok" style="display: none">
<script src="https://podio.com/webforms/7431510/565280.js";></script>
<script type="text/javascript">
_podioWebForm.render("565280")
</script>
</div>

The complete angular code with multiple forms (sans actual data) looks like 
this

<div ng-app="slimgeneration_app" ng-controller="slimgeneration_controller">
<label><strong>Choose a location:<strong></label><br />
<select class="form-control" ng-model="ui.selected_location" 
ng-options="location.name group by location.state for location in 
locations">
</select>
<div ng-repeat="loc in locations" >
<div ng-if="loc.podio_folder_id != 0" ng-show="ui.selected_location.id == 
'loc.id'" >
<script 
ng-src="https://podio.com/webforms/{{loc.podio_folder_id}}/{{loc.podio_js_id}}.js";></script>
<script type="text/javascript">
_podioWebForm.render("{{loc.podio_js_id}}");
</script>
</div>
</div>
</div>

<script type="text/javascript">
var app = angular.module('slimgeneration_app', ['ng']);
 function slimgeneration_controller($scope)
{
$scope.locations =
[
// location information goes here
];
$scope.ui =
{
selected_location: $scope.locations[$scope.locations.length - 2]
};
}
slimgeneration_controller['$inject'] = ['$scope'];
</script>

Thanks in advance,
- David

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to