This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mdToolbar): Allow md-scroll-shrink usage with ng-if.
Previously, the toolbar would fail to enable scroll shrinking if the developer used an `ng-if` statement on the `md-toolbar`. This commit allows usage of `ng-if` as well as watching the `md-scroll-shrink` for changes so they can enable/disable scroll shrinking. Fixes #2751. Closes #4394.
- Loading branch information
1 parent
44a7e52
commit 9b861fd
Showing
2 changed files
with
162 additions
and
23 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
This breaks toolbars that use
ng-include
orng-controller
. Of course the developer could wrap there toolbar in an extradiv
and place theirng-include
orng-controller
attributes on that element but then you end up with two extra unnecessarydivs
I think most developers would expect to be able to put
ng-include
orng-controller
attributes directly on themd-toolbar
element.Maybe instead of using transclusion you can manually wrap the contents of the
md-toolbar
element in an extradiv
if necessary. In addition, the isolated scope is going to break puttingng-controller
directly on themd-toolbar
element as well. Maybe you can usebindToController
instead and create a controller to handle scroll shrink?