Add stock data api call
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { throwToolbarMixedModesError } from '@angular/material/toolbar';
|
||||
import { DataService } from 'src/app/Services/data.service';
|
||||
|
||||
export interface PeriodicElement {
|
||||
name: string;
|
||||
@@ -46,9 +48,11 @@ const ELEMENT_DATA: PeriodicElement[] = [
|
||||
styleUrls: ['./dashboard.component.scss'],
|
||||
})
|
||||
export class DashboardComponent implements OnInit {
|
||||
constructor() {}
|
||||
constructor(private dataService: DataService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
async ngOnInit() {
|
||||
const data = await this.dataService.getStockData();
|
||||
}
|
||||
|
||||
displayedColumns: string[] = ['position', 'name', 'weight', 'symbol'];
|
||||
dataSource = ELEMENT_DATA;
|
||||
|
Reference in New Issue
Block a user