Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

README.md collapsed example fix & bower install #231

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

savras
Copy link

@savras savras commented Oct 5, 2017

Collapsed doesn't work without ui-layout-loaded attribute.
Also updated bower install instructions based on #183

Collapsed doesn't work without ui-layout-loaded attribute.
Also updated bower install instructions based on angular-ui#183
@savras
Copy link
Author

savras commented Oct 5, 2017

Based on the comments in the uiLayoutLoaded directive we have to get ui-layout-loaded to broadcast changes for it to work:
// Currently necessary for programmatic toggling to work with "initially" collapsed containers,
// because prog. toggling depends on the logic of prevButton and nextButton (which should be probably refactored out)
//
// This is how it currently works:
// 1. uiLayoutContainer in prelink phase resets @Collapsed to false, because layout has to be calculated
// with all containers uncollapsed to get the correct dimensions
// 2. layout with ui-layout-loaded attributes broadcasts "ui.layout.loaded"
// 3. user changes values of @Collapsed which triggers 'click' on either of the buttons
// 3. the other button is hidden and container size set to 0

Replaced the #bower install command instead of adding another one to the end.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant