Repository navigation
feat(sidenav): Add support for fixed sidenavs - #6712
Conversation
| OnDestroy, | ||
| Inject, | ||
| ChangeDetectorRef, | ||
| ChangeDetectorRef, ContentChild, forwardRef, |
| }) | ||
| export class MdDrawerContent implements AfterContentInit { | ||
| /** Margins to be applied to the content. */ | ||
| _margins: {left: number, right: number} = {left: 0, right: 0}; |
There was a problem hiding this comment.
Why are these margins here? Add explanation for why this is a thing?
| } | ||
|
|
||
| ngAfterContentInit() { | ||
| this._container._contentMargins.subscribe((margins) => { |
There was a problem hiding this comment.
nit: don't need parents around margins
| /** @deprecated */ | ||
| @Output('align-changed') onAlignChanged = new EventEmitter<void>(); | ||
|
|
||
| _modeChanged = new Subject(); |
There was a problem hiding this comment.
Add comment explaining why this is a thing?
| private _updateContentMargins() { | ||
| let left = 0; | ||
| let right = 0; | ||
|
|
There was a problem hiding this comment.
Add comment that describes which style is applied where based on the mode + position?
| export class MdSidenav extends MdDrawer {} | ||
| export class MdSidenav extends MdDrawer { | ||
| /** Whether the sidenav is fixed in the viewport. */ | ||
| @Input() fixedInViewport = true; |
There was a problem hiding this comment.
Use coerceBooleanProperty
| * The gap between the top of the sidenav and the top of the viewport when the sidenav is in fixed | ||
| * mode. | ||
| */ | ||
| @Input() fixedTopGap = 0; |
| export class MdSidenav extends MdDrawer {} | ||
| export class MdSidenav extends MdDrawer { | ||
| /** Whether the sidenav is fixed in the viewport. */ | ||
| @Input() fixedInViewport = true; |
There was a problem hiding this comment.
Add unit tests for these new fixed properties?
|
@jelbourn comments addressed |
859fc7b to
ff9307f
Compare
c491cfe to
bf1cc46
Compare
21dbdec to
8d77c32
Compare
|
Can we get this into the material2-builds? |
|
Do you have the source code for the working version in the demo? |
|
@KKHAN1991 I looked into the css of the working example and then apply this to your footer item like so: Then I just call my app-footer (i made a component for this) inside my sidebar nav and below my navbar like so; Hope this helps, ive spent the past 4 hours fixing problems and getting it working so i hope i can save someone time |
|
@KKHAN1991 here is the demo: https://material2-dev.firebaseapp.com/sidenav, and here are the files that produce it: https://github.com/angular/material2/tree/master/src/demo-app/sidenav. It works well. |
|
Is there any documentation for this feature other than just |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
temporary demo: https://mmalerba-demo5.firebaseapp.com/sidenav
fixes #3031
fixes #1515
fixes #1179
fixes #998
fixes #778