/* * Copyright (c) 2016 VMware, Inc. All Rights Reserved. * This software is released under MIT license. * The full license information can be found in LICENSE in the root directory of this project. */ import {Component} from "@angular/core"; import {Inventory} from 'clarity-angular/datagrid/demo/inventory/inventory'; import {User} from 'clarity-angular/datagrid/demo/inventory/user'; const EXAMPLE = ` User ID Name Creation date Pokemon Favorite color {{user.id}} {{user.name}} {{user.creation | date}} {{user.pokemon.name}} {{users.length}} users `; @Component({ selector: "clr-datagrid-binding-properties-demo", providers: [Inventory], templateUrl: "./binding-properties.html", styleUrls: ["../datagrid.demo.scss"] }) export class DatagridBindingPropertiesDemo { example = EXAMPLE; users: User[]; constructor(private inventory: Inventory) { inventory.size = 10; inventory.reset(); this.users = inventory.all; } }