Thanks to visit codestin.com
Credit goes to github.com

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

directive template vs. templateUrl #1166

Closed
@realdope

Description

@realdope

I have an example with 2 directives defined. One of them has an anchor, when clicked, inserts the other directive as DOM elements onto the page.

http://jsfiddle.net/realdope/cvzWJ/13

In the above code, "elem" is the element to be inserted into the page. Initially both elements are placed on the page to show that they initially render properly.

When I define "template" instead of "templateUrl" in the "elem" directive definition, everything works perfectly. However, when I use a templateUrl with <script type="text/ng-template">, initial rendering works fine, but event-initiated rendering does not work.

The problem is better demonstrated by using a .html file.

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