Skip to content

Commit 62c8d1f

Browse files
committed
more README fixes
1 parent 5574429 commit 62c8d1f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

demo/angular/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Angular wrapper
22

3-
The Angular [wrapper component](src/gridstack.component.ts) <gridstack> is a better way to use Gridstack, but alternative raw [ngFor](src/ngFor.ts) or [simple](src/simple.ts) demos are also given.
3+
The Angular [wrapper component](src/gridstack.component.ts) <gridstack> is a better way to use Gridstack, but alternative raw [ngFor](src/app/ngFor.ts) or [simple](src/app/simple.ts) demos are also given.
44

55
**NOTE:** still having [issue](https://github.com/gridstack/gridstack.js/issues/2310) exporting the files to be included by Angular projects, so for now copy gridstack/dist/ng/src/* to your project and adjust the paths below.
66

@@ -28,7 +28,7 @@ CSS
2828
}
2929
```
3030

31-
Your module Code
31+
in your module Code
3232
```ts
3333
import { GridstackModule } from 'gridstack/dist/ng/src/gridstack.module';
3434

@@ -44,7 +44,7 @@ Component Code
4444
```ts
4545
import { GridStackOptions } from 'gridstack';
4646

47-
// sample grid options and items to load...
47+
// sample grid options + items to load...
4848
public gridOptions: GridStackOptions = {
4949
margin: 5,
5050
float: true,
@@ -89,11 +89,11 @@ export class BComponent {
8989

9090
// .... in your module for example
9191
constructor() {
92-
// register all our dynamic components created in the grid
92+
// register all our dynamic components types created by the grid
9393
GridstackComponent.addComponentToSelectorType([AComponent, BComponent]);
9494
}
9595

96-
// and now our content will look like instead of dummy html content
96+
// now our content will use Components instead of dummy html content
9797
public gridOptions: NgGridStackOptions = {
9898
margin: 5,
9999
float: true,
@@ -164,10 +164,9 @@ Code now shipped starting with v8.0+ in dist/ng for people to use directly!
164164

165165
## *ngFor Caveats
166166
- This wrapper handles well ngFor loops, but if you're using a trackBy function (as I would recommend) and no element id change after an update,
167-
you must manually update the `GridstackItemComponent.option` directly - see [modifyNgFor()](src/app.component.ts#L174) example.
167+
you must manually update the `GridstackItemComponent.option` directly - see [modifyNgFor()](src/app/app.component.ts#L174) example.
168168
- The original client list of items is not updated to match **content** changes made by gridstack (TBD later), but adding new item or removing (as shown in demo) will update those new items. Client could use change/added/removed events to sync that list if they wish to do so.
169169

170-
171170
Would appreciate getting help doing the same for React and Vue (2 other popular frameworks)
172171

173172
-Alain

0 commit comments

Comments
 (0)