Hi
I have a Habpanel widget where I would like to display an iframe with a dynamic “src” parameter.
my widget definition:
<div oc-lazy-load="['/static/time-line-picker/js/habpanel.js']">
<div ng-controller="ngopen">
<div>
<iframe ng-open ="getdetails()" width="103%" height="475px" frameBorder="0" align="middle" src={{src}}>
</iframe>
</div>
</div>
</div>
habpanel.js:
(function() {
'use strict';
angular
.module('app', [])
.controller('ngopen', ['$scope', function($scope) {
$scope.getdetails = function (source) {
$scope.src = "/static/time-line-picker/index.html?ip=10.0.1.5:8444&transferItem=TransferItemHeatingWC&yAxisLabel=1,2,3,4,5,6,7&lang=de&event=no&dark=yes&zoom=no&colorset=17&states=17,18,19,20,21,22";
}}]);
})();
I would like to read the values for the parameters “colorset” and “states” in the “$scope.src =” string from an item (or the whole “src=” string from an item).
I’m new in js so I hope someone can point me to the right direction.