-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(showHideWhen): remove hidden attribute on directives and use classes
Each directive applies a different class so they won’t remove each other if they’re on the same element. If either class is applied the element won’t display. closes #5836
- Loading branch information
1 parent
dca6540
commit 5692abe
Showing
4 changed files
with
27 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@import "../../globals.core"; | ||
|
||
// Show / Hide When | ||
// -------------------------------------------------- | ||
|
||
// Applied by the showWhen directive | ||
.hidden-show-when { | ||
display: none; | ||
} | ||
|
||
// Applied by the hideWhen directive | ||
.hidden-hide-when { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5692abe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After upgrading from Beta.4 to Beta.5 with no other changes neither showWhen nor hideWhen are working.
In the above example you can see that using showWhen to only show appropriate buttons isn't working as both are visible on both platforms in the Chrome.
5692abe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SP1966 Can you try removing
node_modules
, runningnpm install
again and restartingionic serve
? There may be something going on with the Sass build. If you're still having the issue could you please create a new issue with the html markup for this. Thanks!5692abe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brandy,
I did as you asked but now I'm getting the following error when running Ionic Serve:
node_modules/ionic-angular/components.core.scss Error: Import directives may not be used within control directives or mixins. on line 35 of node_modules/ionic-angular/components.core.scss >> @import "fonts/ionicons"; --^
This results in no CSS styles showing up at all.
5692abe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SP1966 Hey, so this error was caused by a dependency of beta.5, we actually just released beta.6 to resolve this error. It doesn't have many differences from beta.5, so you should be able to update to it without issues. Could you please try that? Thank you!
https://github.com/driftyco/ionic/blob/2.0/CHANGELOG.md#200-beta6-2016-04-21
5692abe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beta 5/6 does not resolve the showWhen/hideWhen issue for me, I'll go ahead and create a new issue.
I really appreciate all your help!