ui-layout
ui-layout copied to clipboard
README.md collapsed example fix & bower install
Collapsed doesn't work without ui-layout-loaded attribute. Also updated bower install instructions based on https://github.com/angular-ui/ui-layout/issues/183
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