material icon indicating copy to clipboard operation
material copied to clipboard

Toolbar in directive, scroll-shrink not working

Open twjacobsen opened this issue 11 years ago • 4 comments

Hi,

I've created a directive for a global nav-bar for my app, which creates a toolbar with some default stuff, and then transcludes page-specific content (actions etc).

Having the md-toolbar with md-scroll-shrink="" does not work, though. As far as I can see, it never catches the $mdContentLoaded event, because the event is broadcast before my directive has loaded.

Is this a fault in my design, or is this an error in the way md-toolbar works?

twjacobsen avatar May 06 '15 11:05 twjacobsen

mdToolbar md-scroll-shrink is not working with ng-if ng-if create new scope. cannot catch $mdContentLoaded

gamame avatar Jul 26 '15 07:07 gamame

Any chance you guys could provide a demo of the exact issue so we can track it down more easily?

Thanks!

topherfangio avatar Aug 24 '15 18:08 topherfangio

http://codepen.io/anon/pen/jPgxqb

<md-toolbar md-scroll-shrink="" ng-if="true">
   ...   
</md-toolbar>
<md-content flex="">
  ...
</md-content>

gamame avatar Aug 25 '15 11:08 gamame

Confirmed; I have a decent idea of what the issue is and will look into it. Thanks!

topherfangio avatar Aug 25 '15 15:08 topherfangio