JSFiddle - React, Tailwind, and code Playground
by Amit Thakur
HTML
<div ng-app="todoApp">
<div ng-controller="ToDoCtrl">
<div ng-repeat="lnk in links" ><div link-frame ng-model="lnk.link"></div></div>
</div>
</div>
JavaScript
var todoApp = angular.module("todoApp",[]);
todoApp.controller("ToDoCtrl", ['$scope',function($scope)
{
$scope.links=[{"name":"google","link":"http://www.google.com"},{"name":"bing","link":"http://www.bing.com"},{"name":"altavista","link":"http://www.altavista.com"}];
}]);
todoApp.directive('linkFrame', [function () {
var directive = {};
directive.restrict = 'A';
directive.transclude = 'true';
directive.scope = { ngModel: '=ngModel'};
directive.template = '<iframe width="420" height="315" ng-src="{{ngModel}}"></iframe>';
directive.link = function ($scope, element, attributes) {
};
return directive;
}]);