Child pages
  • Angular services

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It is recommended to have a suffix "services" as the service package name. (for example default servoy services are found into "servoyservices" directory). To avoid naming collisions between components and services packages. Furthermore, in order to avoid naming collisions among sevices themselves, a new service name should adhere to the same naming convention as WebComponents.

A service can get it scope from the $services angular service/factory that the system provides. On that factory you can ask for the service scope: 

...

From scripting, when calling plugins.testservice.talk() it should execute the service talk method. The service model is automatically synchronized with the server. In order to observe server side modifications the service must add a watch to the service state.

A service can have a method called "cleanup" that will be called when solution is closed in order to clear its state.