Created
August 15, 2018 05:50
-
-
Save cchng/eb2a0e054db45f1a7abbb7fa50b47603 to your computer and use it in GitHub Desktop.
Revisions
-
cchng revised this gist
Aug 15, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export class MyObjectComponent implements OnInit { ngOnInit() { // api returns json containing data with columnDef fields as keys // TODO: figure out how to get nested data this.rowData = this.http.get('http://localhost:3000/api/myobject'); } -
cchng created this gist
Aug 15, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { AgGridModule } from 'ag-grid-angular'; @Component({ templateUrl: 'myobject.component.html' }) export class MyObjectComponent implements OnInit { title = 'app'; columnDefs = [ {headerName: 'Object Name', field: 'object_name' }, {headerName: 'Object Field 1', field: 'object_field_1' }, ]; rowData: any; constructor(private http: HttpClient) { } ngOnInit() { // api returns json containing data // TODO: figure out how to get nested data this.rowData = this.http.get('http://localhost:3000/api/myobject'); } }