You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ionic serve to start the server on localhost://8100
💻 Code Examples
extract from drawer.component.ts to gently open or close the drawer when HTML button is toggled
// Function activated by html button to open drawer if closed and vice-versa// ViewChild 'drawer' used with the read: ElementRef metadata property abovetoggleDrawer(){constdrawer=this.drawer.nativeElement;this.openState.emit(!this.isOpen);if(this.isOpen){drawer.style.transition='.4s ease-out';drawer.style.transform='';this.isOpen=false;}else{drawer.style.transition='.4s ease-in';drawer.style.transform=`translateY(${-this.openHeight}px)`;this.isOpen=true;}}
🆒 Features
SCSS makes drawer open and close gently
📋 Status & To-do list
Status: Working.
To-do: Button text can be linked to drawer status so it says 'open drawer' when drawer closed and 'close drawer' when drawer open. Other scss effects could be added to make the drawer opening/closing more fun.