import { Component , ElementRef , OnInit } from '@angular/core' ; declare var $ ; @ Component ( { selector : 'app-root' , templateUrl : './app.component.html' , styleUrls : [ './app.component.css' ] } ) export class AppComponent implements OnInit { title = 'Angular DataTables examples' ; ngOnInit ( ) { $ . fn . dataTable . ext . errMode = 'none' ; $ ( '.button-collapse' ) . sideNav ( { closeOnClick : true } ) ; } }