Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng-slide-down variable gets updated outside the digest cycle #12

Open
ghost opened this issue Jul 11, 2015 · 0 comments
Open

ng-slide-down variable gets updated outside the digest cycle #12

ghost opened this issue Jul 11, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 11, 2015

I'm using angular-material.

<md-card>
card header here
 <md-card-content ng-class="vm.edit ? '' : 'hide-char-counter'; vm.collapse ? 'no-padding': ''" ng-slide-down="!vm.collapse" lazy-render>Mycontent</md-card-content>
</md-card>

md-card-content, sets a padding of 16px. When my card is collpased, I have an undesired result because md-card-content's padding is visible even though it's collpased.

My solution was to set padding:0 if it's collpased. But the class is never added with ng-class and it's because of how you change the collapsed variable.

Maybe the simple solution is to wrap it in a timeout.

Also if ng-slide-down is true on dom load, I would like it if it didn't do the slide down animation. It happens fast, but it still happens and looks sloppy on page load, with or without lazy-render.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants