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.

ng-if breaks when used inside a custom directive together with templateUrl #7183

Closed

Description

@Schweigi

ng-if does not work when used inside a custom directive and the template is specified using templateUrl. When the custom directive template is specified directly using the "template" parameter then there is no problem. Additionally this problems happens only if the custom directive is inside a ng-repeat.

The bug is reproducible with Angular 1.2.16. A possible workaround is to use ng-show instead.

Sample: http://codepen.io/anon/pen/mdFAo/?editors=101

Activity

  1. IgorMinar commented on Apr 21, 2014

    @IgorMinar
    Contributor

    it's also related to the directive using 'replace:true'

  2. added this to the milestone on Apr 21, 2014
  3. shahata commented on Apr 22, 2014

    @shahata
    Contributor

    it's also related to the template being loaded from $templateCache and the http success callback being invoked slightly before the delayed link in the digest cycle. didn't have time to debug further :(

    here's a bit less complicated reproduce example: http://plnkr.co/edit/IboruW7Dku1hTnPOFMI2?p=preview

  4. modified the milestones: 1.3.0-beta.9, on May 12, 2014
  5. petebacondarwin commented on May 15, 2014

    @petebacondarwin
    Contributor

    This is not fixed by #7387

  6. added this to the 1.3.0-beta.11 milestone on May 23, 2014
  7. 3 remaining items

  8. removed this from the 1.3.0-beta.11 milestone on Jun 6, 2014
  9. IgorMinar commented on Jun 9, 2014

    @IgorMinar
    Contributor

    @petebacondarwin are you looking into this one?

  10. petebacondarwin commented on Jun 9, 2014

    @petebacondarwin
    Contributor

    I've spent some time on it with no progress so far. Could benefit from some
    pairing
    On 9 Jun 2014 20:44, "Igor Minar" notifications@github.com wrote:

    @petebacondarwin https://github.com/petebacondarwin are you looking
    into this one?

    —
    Reply to this email directly or view it on GitHub
    #7183 (comment).

  11. caitp commented on Jun 9, 2014

    @caitp
    Contributor

    @petebacondarwin I enjoy hacking on the compiler, so if you need some help with it don't hesitate to ask. Unless anyone else is in your timezone at the moment, in which case they'd probably be better.

  12. added 3 commits that reference this issue on Jun 13, 2014
    d5350be
    9c0d70d
    6393114
  13. petebacondarwin commented on Jun 13, 2014

    @petebacondarwin
    Contributor
  14. added a commit that references this issue on Jun 13, 2014
    280ed9f
  15. added a commit that references this issue on Jun 13, 2014
    fd420c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions