/*
* 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 = `
<-- ... -->
<-- ... -->
<-- ... -->
Selected users: {{user.name}}
`;
@Component({
selector: "clr-datagrid-selection-demo",
providers: [Inventory],
templateUrl: "selection.html",
styleUrls: ["../datagrid.demo.scss"]
})
export class DatagridSelectionDemo {
example = EXAMPLE;
users: User[];
selected: User[] = [];
constructor(private inventory: Inventory) {
inventory.size = 10;
inventory.reset();
this.users = inventory.all;
}
}