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.

Empty Template results in erroneous XHR when ngInclude is passed a function #3770

Closed
@searls

Description

@searls

Plnkr Demo

screen shot 2013-08-27 at 12 07 48

This is a pretty straightforward issue. When the template cache has an entry for a template set to empty string (""), ng-include of that template by name (e.g. ng-include="foo.html") is smart enough to tell the difference between an empty template and a non-existent one, because it won't attempt to fetch the template with an XHR.

However, if the ngInclude is used in conjunction with an expression that invokes a function (e.g. ng-include="templateFor('footer')"), an empty template will result in an XHR.

This may seem like a minor quibble, but I'm actually experiencing some extremely bizarre downstream behavior in a real application due to this (which utlimately causes Chrome to lock up because it's hitting the digest limit repeatedly).

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