Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var DirApp = angular.module("DirApp", []);
- DirApp.controller('DirApCntrl', ['$scope', function($scope) {
- $scope.result = "Welcome to Custom AngularJS Directives";
- }]);
- DirApp.directive('myCustomDir', function () {
- return {
- // restrict: 'AE',
- template: '<p>{{result}}</p>'
- }
- });
- DirApp.directive('myCustomDirA', function () {
- return {
- restrict: 'A',
- template: '<p>pirates of caribian.</p>'
- }
- });
- DirApp.directive('myCustomDirE', function () {
- return {
- restrict: 'E',
- template: '<p>pirates of caribian.</p>'
- }
- });
- DirApp.directive('myCustomDirC', function () {
- return {
- restrict: 'C',
- template: '<p>JacksSparrow</p>'
- }
- });
Add Comment
Please, Sign In to add comment