Skip to content

Commit

Permalink
docs(snackbar): remove unnecessary viewContainerRef (#1803)
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy authored and jelbourn committed Nov 10, 2016
1 parent 5a04ab6 commit adfc4d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/demo-app/snack-bar/snack-bar-demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, ViewContainerRef} from '@angular/core';
import {Component} from '@angular/core';
import {MdSnackBar} from '@angular/material';

@Component({
Expand All @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions src/lib/snack-bar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

}
Expand Down

0 comments on commit adfc4d1

Please sign in to comment.