مثال
بازگشت به صفحه اصلی
بازگشت به صفحه مقاله
دو ستونی
دو سطری
اجرای کد RUN »
<!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script> <body> <div ng-app="myApp" w3-test-directive></div> <script> var app = angular.module("myApp", []); app.directive("w3TestDirective", function() { return { template : "I was made in a directive constructor!" }; }); </script> </body> </html>