JSFiddle - React, Tailwind, and code Playground
by 亮 薛
HTML
<script src="https://cdnjs.xueliang.org/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="https://cdnjs.xueliang.org/ajax/libs/angular.js/1.5.0-rc.2/angular.js"></script>
<div ng-controller="ctrl">
<web-app ng-repeat="item in list">item</web-app>
</div>
JavaScript
angular.module('myApp', [])
.controller('ctrl', ['$scope', '$timeout', function($scope, $timeout){
$scope.list = ['abc', 'def'];
$timeout(function(){
$scope.list.push('ghi');
$scope.list.push('jkl');
$scope.list.push('mno');
}, 3000);
}])
.directive('webApp', ['$timeout', function($timeout) {
return {
template: '<p>webApp指令</p>'
};
}]);