I'm building a hybrid with ionic APP, this one uses the Angular and I'm not very familiar with JS.
The issue is that I need to insert a YouTube video in the sentence and I ran into the following question: The video link comes from an external API and I need to be inserted in the code by a variable and, however, I can not do work.
Following is a code that exemplifies the problem, where video does not appear in the iframe.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script><title>AngularJs</title></head><bodyng-app><divng-controller="Ctrl">
<p>Link: {{link}}</p>
</div>
<iframe src="{{ link }}" frameborder="0" allowfullscreen="" width="560" height="315" style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe>
<script src="http://code.angularjs.org/1.2.1/angular.min.js"></script><script>functionCtrl($scope){$scope.link="https://www.youtube.com/watch?v=Hl3aJms0xGQ";
}
</script>
</body>
</html>
The same thing happens in this case:
<button id="encontrar-button1" class="button button-balanced button-block icon-left ion-plus-circled" onclick="window.open('http://www.site.com/pagina/{{ url }}/{{ .id }}/', '_system', 'location=yes'); return false;">Link</button>