Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Directives may not be linked by angular.bootstrap in dynamically loaded HTML #1335

@aalcock

Description

@aalcock

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 at http://jsfiddle.net/AlexFigueiredoo/cRr9K/4/). 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 at http://jsfiddle.net/aalcock/hFGb7/10/. Do bring up your JS console to view the messages.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions