You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
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
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.
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 :(
@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.
Activity
IgorMinar commentedon Apr 21, 2014
it's also related to the directive using 'replace:true'
shahata commentedon Apr 22, 2014
it's also related to the template being loaded from
$templateCacheand 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
petebacondarwin commentedon May 15, 2014
This is not fixed by #7387
3 remaining items
IgorMinar commentedon Jun 9, 2014
@petebacondarwin are you looking into this one?
petebacondarwin commentedon Jun 9, 2014
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:
caitp commentedon Jun 9, 2014
@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.
test($compile): failing test to demonstrate issue angular#7183
test($compile): failing test to demonstrate issue angular#7183
test($compile): failing test to demonstrate issue angular#7183
fix($compile): ensure transclude works at root of templateUrl
fix($compile): ensure transclude works at root of templateUrl
fix($compile): ensure transclude works at root of templateUrl
petebacondarwin commentedon Jun 13, 2014
Looks like #7772 fixes this bug:
http://plnkr.co/edit/DY6zCe0pPi9EpO2K3Ee1?p=preview
http://codepen.io/anon/pen/ycdrz
fix($compile): ensure transclude works at root of templateUrl
fix($compile): ensure transclude works at root of templateUrl
fix: ng-if is evil bug, use ng-show instead.