2014-05-20 5 views

답변

4

귀하의 문제는 아직 존재하지 않는 요소에 qtip을 결합하고 있다는 점이다. 가장 좋은 방법은 요소에 추가 할 수있는 qtip 지시문을 만들고 qtip() 메서드를 만든 후 실행시키는 것입니다.

예 :

// remove $('[title!=""]').qtip(); from top of js file 
app.directive('qtip', function() { 
    return { 
    restrict: 'A', 
    link: function(scope, element, attrs) { 
     element.qtip({ content: attrs.qtip}); 
    } 
    }; 
}); 

그런 다음 HTML에서 :

<span qtip="{{friend.gender}} ({{friend.age}} years old)"> [{{$index + 1}}] {{friend.name}}</span> 

Updated plunkr.

관련 문제