Created
November 23, 2020 14:23
-
-
Save Mayankgupta688/66b3059fb0352b2f29088315a368c2f5 to your computer and use it in GitHub Desktop.
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, OnInit } from '@angular/core'; | |
import { ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router'; | |
@Component({ | |
selector: 'app-header', | |
templateUrl: './header.component.html', | |
styleUrls: ['./header.component.css'] | |
}) | |
export class HeaderComponent implements OnInit { | |
empList: any[] = []; | |
constructor(private _routes: ActivatedRoute) { } | |
ngOnInit(): void { | |
this._routes.data.subscribe((response: any) => { | |
this.empList = response.employees; | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment