NodeApiService for ADF

robertwoodhead
Champ in-the-making
Champ in-the-making

Trying to update a node with

this.nodeService.updateNode(this.nodeId, {
properties: node
});
 
and fails with:
 
ERROR TypeError: Cannot read property 'updateNode' of undefined
 
Any elp would be appreciated
2 REPLIES 2

sp2
Elite Collaborator
Elite Collaborator

 Hi,

Which service you are injecting in constructor?

User private nodeService: NodesApiService.

robertwoodhead
Champ in-the-making
Champ in-the-making

Yup thats the way I had it "nodeService: NodesApiService." 

I've since renamed to to 

private nodesApiService: NodesApiService
 
and 
 
this.nodesApiService.updateNode(this.nodeId, {
properties: node
});
 
Same error:  TypeError: Cannot read property 'updateNode' of undefined