Skip to content

Commit

Permalink
Merge pull request #491 from valor-software/feature/handsontable-update
Browse files Browse the repository at this point in the history
  • Loading branch information
rene-leanix authored Dec 12, 2017
2 parents 9fa0d76 + cf97518 commit 53ad373
Show file tree
Hide file tree
Showing 22 changed files with 94 additions and 11,736 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ yarn.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
/package-log.json

# ignore build and dist for now
/dist
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Native Angular2+ wrapper for [Handsontable](https://github.com/handsontable/hand

2. If you are using SystemJS, add the ng2-handsontable path to your SystemJS.config.js: `'ng2-handsontable': 'node_modules/ng2-handsontable/bundles/ng2-handsontable.umd.js'`. Webpack (used by Angular-CLI) picks up the path automatically.

3. Import the `HotTableModule` into your module. Here's a TypeScript example:
3. As [Handsontable wraps the native Promise](https://github.com/handsontable/handsontable/issues/4452), **you will need to import handsontable before zone.js with `import 'handsontable'`**. Otherwise zone.js will throw an error. For an AngularCLI-project, the zone.js import happens in the `polyfill.ts` file.

4. Import the `HotTableModule` into your module. Here's a TypeScript example:

```typescript
import { HotTableModule } from 'ng2-handsontable';
Expand All @@ -30,7 +32,7 @@ export class MyModule {
}
```

4. Use the `hotTable` component in your template. The following example displays the supported attributes:
5. Use the `hotTable` component in your template. The following example displays the supported attributes:

```html
<hotTable [data]="data"
Expand All @@ -52,10 +54,10 @@ export class MyModule {

The free version of Handsontable is used by default, but the pro-version could be used as a drop-in replacement.

4. The following methods are available as a public API on HotTable component (which you can access from your parent component with `@ViewChild(HotTable) hotTableComponent`):
6. The following methods are available as a public API on HotTableComponent (which you can access from your parent component with `@ViewChild(HotTableComponent) hotTableComponent`):
- `getHandsontableInstance(): Handsontable` - returns the underlying [Handsontable Core instance](https://docs.handsontable.com/Core.html); all registered Handsontable plugins are accessible via [instance.getPlugin()](https://docs.handsontable.com/pro/1.11.0/Core.html#getPlugin)

5. See the [demo](http://valor-software.github.io/ng2-handsontable/) and the [demo sources](https://github.com/valor-software/ng2-handsontable/tree/master/demo/src) for further details.
7. See the [demo](http://valor-software.github.io/ng2-handsontable/) and the [demo sources](https://github.com/valor-software/ng2-handsontable/tree/master/demo/src) for further details.


## Troubleshooting
Expand Down
Loading

0 comments on commit 53ad373

Please sign in to comment.