import { Component , OnInit } from '@angular/core' ; @ Component ( { selector : 'app-material' , templateUrl : './material.component.html' , styleUrls : [ './material.component.css' ] } ) export class MaterialComponent implements OnInit { isDarkTheme : boolean = false ; foods : any [ ] = [ { name : 'Pizza' , rating : 'Excellent' } , { name : 'Burritos' , rating : 'Great' } , { name : 'French fries' , rating : 'Pretty good' } , ] ; progress : number = 0 ; constructor ( ) { } ngOnInit ( ) { setInterval ( ( ) => { this . progress = ( this . progress + Math . floor ( Math . random ( ) * 4 ) + 1 ) % 100 ; } , 200 ) ; } }