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
Copy file name to clipboardExpand all lines: docs-content/examples-highlighted/material/sidenav/sidenav-responsive/sidenav-responsive-example-html.html
],template: "@if (shouldRun) {\n <div class=\"example-container\" [class.example-is-mobile]=\"isMobile()\">\n <mat-toolbar class=\"example-toolbar\">\n <button mat-icon-button (click)=\"snav.toggle()\"><mat-icon>menu</mat-icon></button>\n <h1 class=\"example-app-name\">Responsive App</h1>\n </mat-toolbar>\n\n <mat-sidenav-container class=\"example-sidenav-container\"\n [style.marginTop.px]=\"isMobile() ? 56 : 0\">\n <mat-sidenav #snav [mode]=\"isMobile() ? 'over' : 'side'\"\n [fixedInViewport]=\"isMobile()\" fixedTopGap=\"56\">\n <mat-nav-list>\n @for (nav of fillerNav; track nav) {\n <a mat-list-item routerLink=\".\">{{nav}}</a>\n }\n </mat-nav-list>\n </mat-sidenav>\n\n <mat-sidenav-content>\n @for (content of fillerContent; track content) {\n <p>{{content}}</p>\n }\n </mat-sidenav-content>\n </mat-sidenav-container>\n </div>\n} @else {\n <div>Please open on Stackblitz to see result</div>\n}\n",styles: [".example-container {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.example-is-mobile .example-toolbar {\n position: fixed;\n /* Make sure the toolbar will stay on top of the content as it scrolls past. */\n z-index: 2;\n}\n\nh1.example-app-name {\n margin-left: 8px;\n}\n\n.example-sidenav-container {\n /* When the sidenav is not fixed, stretch the sidenav container to fill the available space. This\n causes `<mat-sidenav-content>` to act as our scrolling element for desktop layouts. */\n flex: 1;\n}\n\n.example-is-mobile .example-sidenav-container {\n /* When the sidenav is fixed, don't constrain the height of the sidenav container. This allows the\n `<body>` to be our scrolling element for mobile layouts. */\n flex: 1 0 auto;\n}\n"]}]
184
+
args: [{selector: 'sidenav-responsive-example',imports: [MatToolbarModule,MatButtonModule,MatIconModule,MatSidenavModule,MatListModule],template: "@if (shouldRun) {\n <div class=\"example-container\" [class.example-is-mobile]=\"isMobile()\">\n <mat-toolbar class=\"example-toolbar\">\n <button mat-icon-button (click)=\"snav.toggle()\"><mat-icon>menu</mat-icon></button>\n <h1 class=\"example-app-name\">Responsive App</h1>\n </mat-toolbar>\n\n <mat-sidenav-container class=\"example-sidenav-container\"\n [style.marginTop.px]=\"isMobile() ? 56 : 0\">\n <mat-sidenav #snav [mode]=\"isMobile() ? 'over' : 'side'\"\n [fixedInViewport]=\"isMobile()\" fixedTopGap=\"56\">\n <mat-nav-list>\n @for (nav of fillerNav; track nav) {\n <a mat-list-item>{{nav}}</a>\n }\n </mat-nav-list>\n </mat-sidenav>\n\n <mat-sidenav-content>\n @for (content of fillerContent; track content) {\n <p>{{content}}</p>\n }\n </mat-sidenav-content>\n </mat-sidenav-container>\n </div>\n} @else {\n <div>Please open on Stackblitz to see result</div>\n}\n",styles: [".example-container {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.example-is-mobile .example-toolbar {\n position: fixed;\n /* Make sure the toolbar will stay on top of the content as it scrolls past. */\n z-index: 2;\n}\n\nh1.example-app-name {\n margin-left: 8px;\n}\n\n.example-sidenav-container {\n /* When the sidenav is not fixed, stretch the sidenav container to fill the available space. This\n causes `<mat-sidenav-content>` to act as our scrolling element for desktop layouts. */\n flex: 1;\n}\n\n.example-is-mobile .example-sidenav-container {\n /* When the sidenav is fixed, don't constrain the height of the sidenav container. This allows the\n `<body>` to be our scrolling element for mobile layouts. */\n flex: 1 0 auto;\n}\n"]}]
0 commit comments