diff --git a/src/demo-app/snack-bar/snack-bar-demo.ts b/src/demo-app/snack-bar/snack-bar-demo.ts index e6ec6e2d6537..354eb40410e1 100644 --- a/src/demo-app/snack-bar/snack-bar-demo.ts +++ b/src/demo-app/snack-bar/snack-bar-demo.ts @@ -1,4 +1,4 @@ -import {Component, ViewContainerRef} from '@angular/core'; +import {Component} from '@angular/core'; import {MdSnackBar} from '@angular/material'; @Component({ @@ -12,8 +12,7 @@ export class SnackBarDemo { action: boolean = false; constructor( - public snackBar: MdSnackBar, - public viewContainerRef: ViewContainerRef) { } + public snackBar: MdSnackBar) { } open() { this.snackBar.open(this.message, this.action && this.actionButtonLabel); diff --git a/src/lib/snack-bar/README.md b/src/lib/snack-bar/README.md index 96f39ce98467..8d6d123e2114 100644 --- a/src/lib/snack-bar/README.md +++ b/src/lib/snack-bar/README.md @@ -26,12 +26,10 @@ The service can be injected in a component. }) export class MyComponent { - constructor(snackBar: MdSnackBar - viewContainerRef: ViewContainerRef) {} + constructor(snackBar: MdSnackBar) {} failedAttempt() { - config = new MdSnackBarConfig(this.viewContainerRef); - this.snackBar.open('It didn\'t quite work!', 'Try Again', config); + this.snackBar.open('It didn\'t quite work!', 'Try Again'); } }