Guest User

Untitled

a guest
Mar 17th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. var DirApp = angular.module("DirApp", []);
  2. DirApp.controller('DirApCntrl', ['$scope', function($scope) {
  3. $scope.result = "Welcome to Custom AngularJS Directives";
  4. }]);
  5.  
  6. DirApp.directive('myCustomDir', function () {
  7. return {
  8. // restrict: 'AE',
  9. template: '<p>{{result}}</p>'
  10. }
  11. });
  12.  
  13. DirApp.directive('myCustomDirA', function () {
  14. return {
  15. restrict: 'A',
  16. template: '<p>pirates of caribian.</p>'
  17. }
  18. });
  19.  
  20. DirApp.directive('myCustomDirE', function () {
  21. return {
  22. restrict: 'E',
  23. template: '<p>pirates of caribian.</p>'
  24. }
  25. });
  26.  
  27. DirApp.directive('myCustomDirC', function () {
  28. return {
  29. restrict: 'C',
  30. template: '<p>JacksSparrow</p>'
  31. }
  32. });
Add Comment
Please, Sign In to add comment