If you do <ng2-md-datatable [selectable]="true" (selectionChange)="onSelectionChange($event)">, angular report a error because in that time selectionChange is undefined.
if you move the initialization code from ngOnInit to constructor(MdDataTableComponent), it is working.
ngOnInit() {
this.selectionChange = new EventEmitter<IDatatableSelectionEvent>(true); // async
this.sortChange = new EventEmitter<IDatatableSortEvent>(true); // async
If you do <ng2-md-datatable [selectable]="true" (selectionChange)="onSelectionChange($event)">, angular report a error because in that time selectionChange is undefined.
if you move the initialization code from ngOnInit to constructor(MdDataTableComponent), it is working.
Or may be I am wrong?