title: How to bind rowdata of ag-grid inside gridoption using a httpservice
body: <p>I am using ag-grid license edition and want to bring record set to the grid using a service. I am using Ag-Grid gridoption property and initializing rowdata 
   in the constructor of  the component.ts class. But the data is not rendering. No error either. Please have a look of my component.ts class.</p>
  
  <p><strong>Please note: the web api is returning the json data correctly and the service in Angular is tested sucessfully without Ag-Grid</strong></p>
  
  <pre><code>import {Component, OnInit} from "@angular/core";
  import {GridOptions} from "ag-grid";
  import {RedComponentComponent} from "../red-component/red-component.component";
  import { person } from "../Shared/models/person.model";
  import {personservice} from '../service/person.service';
  
  @Component({
      selector: 'app-my-grid-application',
      templateUrl: './my-grid-application.component.html'
  })
  export class MyGridApplicationComponent implements OnInit{
      private gridOptions: GridOptions;
      private persons: person[];
      constructor(private personservice: personservice) {
          this.gridOptions = &lt;GridOptions&gt;{};
          this.gridOptions.columnDefs = [
              {
                  headerName: "ID",
                  field: "PersonId",
                  width: 100
              },
              {
                  headerName: "Name",
                  field: "PersonNm",
                  cellRendererFramework: RedComponentComponent,
                  width: 100
              },
              {
                headerName: "Email",
                field: "PersonEmail",
                cellRendererFramework: RedComponentComponent,
                width: 100
            }
  
          ];
  
          this.gridOptions.rowData = this.persons
  
      }
      ngOnInit() {
        this.personservice.findAll().subscribe(
            persons =&gt; {
              this.persons = persons
            },
            error =&gt; {
                console.log(error);
            }
        )
    }
  }
  </code></pre>