Child pages
  • Angular services
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Services are similar to WebComponents except they have no User Interface. They are mapped to Servoy plugins (in order to call their api from scripting).

 Inside war structure, NG Client Services have to be present in special folders whose names end with "services" suffix (for example default servoy services are found into "servoyservices" directory). A folder that doesn't end with "services" will be handled as web component folder.

The difference between service and web component is that service doesn't have user interface (so also doesn't have html template). A service must contain the specification file and the js file. The service specification file is exactly the same as web component specification file. However, as there is no UI, there is no support for handlers. Service API can be called from scripting as a plugin.

service specification
{
	"name": "testservice",
	"displayName": "Test service that says helloworld",
	"definition": "servoyservices/testservice/testservice.js",
	"libraries": [],
	"model":
	{
		"text": "string"
	},
	"api":
	{
	 	"talk": {
	        }
	}
}

  • No labels