4

Possible Duplicate:
AngularJS + JQuery : How to get dynamic content working in angularjs

I have an application based on AngularJS 1.0.1 and Bootstrap 2.0.2.

The application dynamically loads views; I use angular.bootstrap() to compile and link these fragments, and AngularJS is appears to be working fine, linking to my model and responding to events.

I want to put a Bootstrap tooltip on some dynamic elements, and have created a directive for this (using the approach laid out by AlexFigueiredoo). This approach works well when the AngularJS view is on static HTML as you can see from the jsFiddle.

However, when the same code is used in an environment where the HTML is dynamically loaded, the popup is not working. Investigating, the 'tooltip' directive is now not being linked.

I have a test-case on jsFiddle. Do bring up your JS console to view the messages.

Note that console.log never shows the directive factory being called, let alone linked.

Am I doing something wrong?

4

1 回答 1

0

我将工具提示属性添加到标签的末尾,它对我有用。看起来您忘记了实时示例中的指令?

http://jsfiddle.net/CcRrN/

于 2012-09-04T16:07:14.123 回答