Programming Steps
Step-By-Step Programming For Beginners
Auto-Codes
C Language
Cobol 85 Language
ColdFusion Language
Cordova
HTML5
Java Language
Mobile
Objective-C Language
PhoneGap
PHP
Python Language
Ruby Language
Learn the powerful enterprise adaptable database:
Getting Started With ADABAS & Natural
Thursday, March 3, 2016
w3s108-AngularJS Directives Custom
w3s108-AngularJS Directives Custom
code example:
index.html
<!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script> <body ng-app="myApp"> <w3-test-directive></w3-test-directive> <div w3-test-directive></div> <script> var app = angular.module("myApp", []); app.directive("w3TestDirective", function() { return { restrict : "A", template : "<h1>Made by a directive!</h1>" }; }); </script> <p><strong>Note:</strong> By setting the <strong>restrict</strong> property to "A", only the HTML element with the "w3-test-directive" attribute has invoked the directive.</p> </body> </html>
https://www.w3schools.com/angular/angular_directives.asp
201603
Related Posts:
w3s122-AngularJS Service Custom
w3s121-AngularJS Service Interval
What is Tilde in Programming?
TypeScript Online Editor
What is TypeScript?
Related Posts Widget
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment