Services
An overview of services and how to use them
Introduction
Implementing a Service
const { Service } = require ('@onehilltech/blueprint');
module.exports = Service.extend ({
_messages: null,
init () {
this._super.call (this, ...arguments);
this._messages = [];
},
push (msg) {
this._messages.push (msg);
},
find (id) {
return this._messages.find (msg => msg.id === id);
}
});Accessing a Service
Service Lifecycle
Last updated