Skip to content

Instantly share code, notes, and snippets.

Created March 9, 2018 15:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
DataGridComponent for displaying a filtered data grid.
import { Company } from './../../data/company-data';
import { Component, OnInit, Input } from '@angular/core';
selector: 'app-data-grid',
templateUrl: './data-grid.component.html',
styleUrls: ['./data-grid.component.sass']
export class DataGridComponent implements OnInit {
filteredData: Array<Company>;
set data(data: Array<Company>) {
this.filteredData = data;
get data() {
return this.filteredData;
_animate: boolean;
set animate(animate: boolean) {
this._animate = animate;
get animate() {
return this._animate;
constructor() {}
ngOnInit() {
this.filteredData =;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment