Skip to content

Commit 552aff0

Browse files
crisbetojosephperrott
authored andcommitted
docs(snack-bar): fix 404 for CSS files in examples (angular#14684)
Fixes a couple of the live examples causing a 404 if the user goes to look at their CSS. Fixes angular#14682.
1 parent 8178c40 commit 552aff0

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/** No CSS for this example */

src/material-examples/snack-bar-component/snack-bar-component-example.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ import {MatSnackBar} from '@angular/material';
77
@Component({
88
selector: 'snack-bar-component-example',
99
templateUrl: 'snack-bar-component-example.html',
10+
styleUrls: ['snack-bar-component-example.css'],
1011
})
1112
export class SnackBarComponentExample {
12-
constructor(public snackBar: MatSnackBar) {}
13+
constructor(private snackBar: MatSnackBar) {}
1314

1415
openSnackBar() {
1516
this.snackBar.openFromComponent(PizzaPartyComponent, {

src/material-examples/snack-bar-overview/snack-bar-overview-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {MatSnackBar} from '@angular/material';
1010
styleUrls: ['snack-bar-overview-example.css'],
1111
})
1212
export class SnackBarOverviewExample {
13-
constructor(public snackBar: MatSnackBar) {}
13+
constructor(private snackBar: MatSnackBar) {}
1414

1515
openSnackBar(message: string, action: string) {
1616
this.snackBar.open(message, action, {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/** No CSS for this example */

src/material-examples/snack-bar-position/snack-bar-position-example.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ import {
1111
@Component({
1212
selector: 'snack-bar-position-example',
1313
templateUrl: 'snack-bar-position-example.html',
14+
styleUrls: ['snack-bar-position-example.css'],
1415
})
1516
export class SnackBarPositionExample {
1617

1718
horizontalPosition: MatSnackBarHorizontalPosition = 'start';
1819
verticalPosition: MatSnackBarVerticalPosition = 'bottom';
1920

20-
constructor(public snackBar: MatSnackBar) {}
21+
constructor(private snackBar: MatSnackBar) {}
2122

2223
openSnackBar() {
2324
this.snackBar.open('Canonball!!', 'End now', {

0 commit comments

Comments
 (0)