From 0fd3acc5b73ebfdb8248f1bceee5fa0f85dae6de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sauli=20T=C3=A4hk=C3=A4p=C3=A4=C3=A4?= Date: Wed, 27 Apr 2016 11:58:52 +0300 Subject: [PATCH] Remove angular 2 documentation --- docs/vaadin-grid-angular2.adoc | 75 ---------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 docs/vaadin-grid-angular2.adoc diff --git a/docs/vaadin-grid-angular2.adoc b/docs/vaadin-grid-angular2.adoc deleted file mode 100644 index 48fbcc50f..000000000 --- a/docs/vaadin-grid-angular2.adoc +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: Grid Usage with Angular 2 -order: 1 -layout: page ---- - -[[vaadin-grid.angular2]] -= Usage with Angular 2 - -This chapter will briefly go through Angular 2 specific features. -For the most part you can use the API provided by the element described in other sections of the documentation. -Before jumping in, you should follow the common installation instructions which apply to all Vaadin Core Elements. - -== Configuration - -The easiest way is to use the declarative way, so as you can configure the grid using a table section in your template. - -[source,html] ----- - - - - - - - -
-
----- - -== Data-binding - -In order to bind an array of items to the [elementname]#vaadin-grid# element, you can use normal data-binding syntax of Angular 2. - -[source,html] ----- - - - - - -
-
----- - -== Function items - -To have a full data control, you can use functions. The item function accepts two parameters. The first parameter is an object -with the data index and count properties, the second one is a callback to inform the grid with the data array and total size. - -[source,html] ----- - - - - - - - -
-
----- - -[source,typescript] ----- -private expensesFunction(params, callback) { - const filters: any = this.filters || {}; - const url = './api/expenses?index=' + params.index + '&count=' + params.count; - const totalCount = 200; - - this.getJSON(url, (data) => { - callback(data, totalCount); - }); -} -----