<!-- IN APP ROOT --> <div class="scroll-window"> <div [ngStyle]="(layout.isMobile$ | async) ? { 'width':'calc(80%)', 'margin': 'auto' } : { 'width': 'calc(90%)', 'margin' : 'auto' }"> <router-outlet></router-outlet> </div> </div> // in Sidebar Component ngOnInit() { this.layout.layoutState$.subscribe((res: string) => { if (res == 'isTablet') { this.toggleMenuTo('closed'); } }) }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter