Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ this is the recommended way if you are going to have multiple grids (alow drag&d

I.E. don't use Angular templating to create grid items as that is harder to sync when gridstack will also add/remove items.

HTML
MyComponent HTML

```html
<gridstack [options]="gridOptions"></gridstack>
```

CSS
MyComponent CSS

```css
@import "gridstack/dist/gridstack.min.css";
Expand All @@ -30,7 +30,7 @@ CSS
```


Standalone Component Code
Standalone MyComponent Code

```ts
import { GridStackOptions } from 'gridstack';
Expand All @@ -47,7 +47,7 @@ export class MyComponent {
// sample grid options + items to load...
public gridOptions: GridStackOptions = {
margin: 5,
children: [ // or call load()/addWidget() with same data
children: [ // or call load(children) or addWidget(children[0]) with same data
{x:0, y:0, minW:2, content:'Item 1'},
{x:1, y:0, content:'Item 2'},
{x:0, y:1, content:'Item 3'},
Expand Down
11 changes: 3 additions & 8 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,9 @@ <h1>Demos</h1>
</ul>
<h1>Angular wrapper</h1>
<p>We now ship an <a href="https://github.com/gridstack/gridstack.js/tree/master/angular/" target="_blank">Angular Component</a>
to make it supper easy for that framework (Vue and React examples are above)</p>
<p>These are complete Angular projects with multiple options. use `yarn` and `yarn start` in <a href="https://github.com/gridstack/gridstack.js/tree/master/angular/projects/demo" target="_blank">angular demo</a> sub-project to run them</p>
<ol>
<li><a href="../angular/projects/demo/src/app/simple.ts">simple.ts</a></li>
<li><a href="../angular/projects/demo/src/app/ngFor.ts">ngFor.ts</a></li>
<li><a href="../angular/projects/demo/src/app/ngFor_cmd.ts">ngFor with command</a> (not recommended)</li>
<li><a href="../angular/projects/lib/src/lib/gridstack.component.ts">gridstack.component.ts</a> and <a href="../angular/projects/lib/src/lib/gridstack-item.component.ts">gridstack-item.component.ts</a> (BEST)</li>
</ol>
to make it supper easy for that framework</p>
<h1>React wrapper</h1>
<p>React original examples are shown above, but upcoming and better TS based <a href="https://github.com/gridstack/gridstack.js/tree/master/react/" target="_blank">/react</a> folder (working to make that official and ship it) should be looked at instead. </p>
<h1>Old v5.1.1 Jquery Demos</h1>
Note: those are no longer supported, and use an old version of the lib to compare functionality.
<ul>
Expand Down