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

bug in ng-if #7334

Closed
ruben-podadera opened this issue May 2, 2014 · 4 comments
Closed

bug in ng-if #7334

ruben-podadera opened this issue May 2, 2014 · 4 comments

Comments

@ruben-podadera
Copy link

Hi,

I think I found a bug with ng-if directive. I can not manage to reproduce it in a js fiddle. The bug is within a big project. I tried to simplify it but there is no bug wher I do so...

This piece of code is in a directive template

...
{{(contract.status == 'Submitted') && (current_user.id == contract.tenant_signer.id)}}
<div ng-if="(contract.status == 'Submitted') && (current_user.id == contract.tenant_signer.id)" class="delivery-type form-control">
    ng-if div
</div>
...

The contract status is modified by a another event in a contract controller.
I think we can assume that if the first line shows false, then the div should not be in the dom (the test is the same). From time to time (1 of 3 more or less), I have that :

image

I'm sorry I can not reproduce that in a fiddle, I know my report is not being very helpfull but I just wanted to let you know.

Anyway, thanks for this awesome framework! Best Regards,

Ruben

@ruben-podadera
Copy link
Author

I forget to mention it works fine with ng-show. That's what I used to "fix" it.

@lgalfaso
Copy link
Contributor

lgalfaso commented May 2, 2014

@ruben-podadera without a way to reproduce this, then there is very little that can be done. What version of angular are you using? The closes report I can think about is #4930 that was fixed quite a few month back

@ruben-podadera
Copy link
Author

@lgalfaso I know :-( version 1.2.17-build.115

I think you can close it...

@lgalfaso
Copy link
Contributor

lgalfaso commented May 5, 2014

@ruben-podadera if you are able to create a fiddle that is able to reproduce this issue, then please reopen this issue, until then, I am closing it

@lgalfaso lgalfaso closed this as completed May 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants