Register and Subscribe
SYMPHONY.services.make()
SYMPHONY.services.make(name, context, methods, makeEventHandlers)class Navigation {
implements = ['ready', 'select'];
serviceName = 'sample-navigation';
register() {
SYMPHONY.services.make(this.serviceName, this, this.implements, true);
}
ready() {
this.nav = SYMPHONY.services.subscribe('applications-nav');
this.nav.add('sample', 'My App', this.serviceName)
}
select() {
// do something here
}
}
var service = new Navigation();
service.register()SYMPHONY.services.register()
SYMPHONY.services.subscribe()
SYMPHONY.remote.register()
SYMPHONY.remote.subscribe()
Last updated
Was this helpful?