Skip to content

Commit

Permalink
Update readme.md for updated NodeComponent API
Browse files Browse the repository at this point in the history
NodeComponent now requires a change detector ref, some doc's were out of date.
  • Loading branch information
AgentEnder authored Jul 23, 2020
1 parent c3e8748 commit e2820b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Custom node
Extend node component
```ts
import { Component, ChangeDetectorRef } from "@angular/core";
import { NodeComponent, NodeService } from 'rete-angular-render-plugin';

@Component({
Expand All @@ -55,8 +56,8 @@ import { NodeComponent, NodeService } from 'rete-angular-render-plugin';
providers: [NodeService]
})
export class MyNodeComponent extends NodeComponent {
constructor(protected service: NodeService) {
super(service);
constructor(protected service: NodeService, protected cdr: ChangeDetectorRef) {
super(service, cdr);
}
}
```
Expand Down

0 comments on commit e2820b0

Please sign in to comment.