Kévin BEAUGRAND
Kévin BEAUGRAND

Reputation: 302

Angular4 Material MdTable not working in router-outlet

Could anyone help me to solve an issue when using an angular material table with Angular4 and Routing module.

I've created a punkler that illustrate my issue. The code was almoste copied form the original tutorial from material.angular.io.

As you can see, I expect to have a table displayed juste below the Hello Angular! v4.3.0 title.

Regards,

Upvotes: 0

Views: 200

Answers (1)

M3gur0
M3gur0

Reputation: 26

You can do this workaround to fix your issue waiting for bug to be fixed by angular material team: https://github.com/angular/material2/issues/5593. Preferred workaround: force detectionChange in your component.

ngOnInit() {
  //data initialization
  this.changeDetector.detectChanges();
}

Upvotes: 1

Related Questions