[AngularJS] - Directives 2
RUN
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Ví dụ sử dụng Directive</title> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script> <script language="javascript"> angular.module('myapp', []) .controller('MyController', ['$scope', function($scope) {}]); </script> </head> <body ng-app="myapp"> <div ng-controller="MyController"> <div my-customer ng-init="demo='Nội dung'">{{demo}}</div> {{demo}} </div> {{demo}} </body> </html>
PHÓNG TO