Guest User

Untitled

a guest
May 30th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <span ng-repeat="name in names">
  2. <ii ng-class="{red: isRed}">Here comes HTML<br/> with {{name}} bla bla </ii>
  3. </span>
  4.  
  5. EZcountApp.controller('myCtr',function($scope){
  6. $scope.isRed = true;
  7. $scope.names= ['Alon','Moshe','Zvi'];
  8. });
  9.  
  10. <i class="fa fa-question-circle" ng-class="{red: isRed}" title="
  11. Here comes HTML<br/> with {{name}} bla bla
  12. "></i>
  13.  
  14. <span><i class="fa fa-question-circle red" title="Here comes HTML<br/> with Alon bla bla"></i></span>
  15. <span><i class="fa fa-question-circle red" title="Here comes HTML<br/> with Moshe bla bla"></i></span>
  16. <span><i class="fa fa-question-circle red" title="Here comes HTML<br/> with Zvi bla bla"></i></span>
  17.  
  18. myApp.directive('ii',function(){
  19. return {
  20. restrict: 'E',
  21. transclude: 'element',
  22. replace: true,
  23. scope: {},
  24. controller: function ($scope, $element, $attrs, $transclude) {
  25. // if there is no class of fa-XXXX
  26. // some login removed from here...
  27. $element.addClass('fa-question-circle');
  28.  
  29.  
  30. },
  31. template: "<i class='fa help-icon' data-toggle='tooltip' data-placement='top' ng-transclude></i>"
  32. };
  33. });
Add Comment
Please, Sign In to add comment