update the treecursive directive when the nodes get updated on controller/service