Created
January 11, 2018 04:55
-
-
Save rahulsahay19/59b0b0a90d3749bbcd4e2114b97abb96 to your computer and use it in GitHub Desktop.
app.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { strictEqual } from 'assert'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent { | |
title = 'app'; | |
feedStatus = new Promise((resolve,reject)=>{ | |
setTimeout(()=>{ | |
resolve('New Feed!'); | |
},3000) | |
}); | |
Employees=[ | |
{ | |
name: 'John Cena', | |
joined: new Date(11,1,2015), | |
desig:'Developer', | |
location:'Bangalore' | |
}, | |
{ | |
name: 'Dave Black', | |
joined: new Date(2,1,2017), | |
desig:'Architect', | |
location:'Bangalore' | |
}, | |
{ | |
name: 'Rahul Sahay', | |
joined: new Date(15,5,2017), | |
desig:'Technical Fellow', | |
location:'Bangalore' | |
}, | |
{ | |
name: 'Tom Jakobsen', | |
joined: new Date(17,4,2017), | |
desig:'Tech Lead', | |
location:'Bangalore' | |
} | |
] | |
getEmployees(employee:{name:string, joined:Date,desig:string,location:string }){ | |
return{ | |
'alert-success': employee.name === 'Rahul Sahay', | |
'alert-warning': employee.name === 'Tom Jakobsen', | |
'alert-danger': employee.name === 'Dave Black', | |
'alert-info': employee.name === 'John Cena' | |
}; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment