Advertisement
Guest User

Untitled

a guest
Sep 21st, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <my-element my-attribute="false" />
  2.  
  3. myApp.directive('myElement', function ($window) {
  4. return {
  5. restrict:'E',
  6. transclude: true,
  7. scope: {
  8. myAttribute: '='
  9. },
  10. controller: function($scope) {
  11.  
  12. },
  13. template: '<div>Hello <span ng-if="myAttribute == true">, World</span></div>'
  14. };
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement