Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

widget-services: remove applyViewChanges in favour of axHeartbeat #337

Closed
x1B opened this issue Jul 21, 2016 · 1 comment
Closed

widget-services: remove applyViewChanges in favour of axHeartbeat #337

x1B opened this issue Jul 21, 2016 · 1 comment

Comments

@x1B
Copy link
Member

x1B commented Jul 21, 2016

The applyViewChanges method can be replaced by axHeartbeat to avoid complicating our APIs.

@alex3683
Copy link
Member

Implemented on master (v2.0.0).

Breaking Change

Support for the applyViewChanges function of widget adapters was removed and will no longer be called on heartbeat tick. Instead, widget adapters that need to act on heartbeat tick (e.g. the AngularJS adapter) now have to register themselves.

Example:

export function bootstrap( modules, laxarServices ) {
   // ...
   laxarServices.heartbeat.registerHeartbeatListener( () => { $rootScope.$digest(); } );
   // ...
   return {
      create,
      serviceDecorators,
      technology
   };
}

Before it was:

export function bootstrap( modules, laxarServices ) {
   // ...
   return {
      create,
      serviceDecorators,
      technology,
      applyViewChanges() { $rootScope.$digest(); }
   };
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants