Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Company } from './../../data/company-data';
- import { Component, OnInit, Input } from '@angular/core';
- @Component({
- selector: 'app-data-grid',
- templateUrl: './data-grid.component.html',
- styleUrls: ['./data-grid.component.sass']
- })
- export class DataGridComponent implements OnInit {
- filteredData: Array<Company>;
- @Input()
- set data(data: Array<Company>) {
- this.filteredData = data;
- };
- get data() {
- return this.filteredData;
- }
- _animate: boolean;
- @Input()
- set animate(animate: boolean) {
- this._animate = animate;
- };
- get animate() {
- return this._animate;
- }
- constructor() {}
- ngOnInit() {
- this.filteredData = this.data;
- }
- }
Add Comment
Please, Sign In to add comment