Skip to content

Commit

Permalink
docs(table): fix http demo (#9528)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewseguin authored and jelbourn committed Jan 29, 2018
1 parent ff0662d commit 8319a57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/material-examples/table-http/table-http-example.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, AfterViewInit, ViewChild} from '@angular/core';
import {Component, OnInit, ViewChild} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {MatPaginator, MatSort, MatTableDataSource} from '@angular/material';
import {Observable} from 'rxjs/Observable';
Expand All @@ -17,21 +17,21 @@ import {switchMap} from 'rxjs/operators/switchMap';
styleUrls: ['table-http-example.css'],
templateUrl: 'table-http-example.html',
})
export class TableHttpExample implements AfterViewInit {
export class TableHttpExample implements OnInit {
displayedColumns = ['created', 'state', 'number', 'title'];
exampleDatabase: ExampleHttpDao | null;
dataSource = new MatTableDataSource();

resultsLength = 0;
isLoadingResults = false;
isLoadingResults = true;
isRateLimitReached = false;

@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;

constructor(private http: HttpClient) {}

ngAfterViewInit() {
ngOnInit() {
this.exampleDatabase = new ExampleHttpDao(this.http);

// If the user changes the sort order, reset back to the first page.
Expand Down

0 comments on commit 8319a57

Please sign in to comment.