davinkevin / AngularStompDK

Angular service to communicate to Stomp-Websocket
http://davinkevin.github.io/AngularStompDK/
Apache License 2.0
36 stars 12 forks source link

feat(provider): add decorator to config the provider #21

Closed davinkevin closed 7 years ago

davinkevin commented 8 years ago

The lib is built upon ES2015 and more right now, so we can use decorator to configure the NgStompProvider.

I would like to add something like this :

@StompConfig({
    login : 'aLogin',
    password : 'aPassword',
    class : SockJS,
})
export default class MyComponentWithStompWS {}

The only problem with this implementation is I need an AngularModule to register the config, so an extra parameters should be provided. In decorators written for an Angular-JSPM-Seed, we register the angular module as a static attribute of the class named $angularModule, so we can retrieve it during decorator evaluation. Another solution should be found to improve the API and the integration with others decorators.

davinkevin commented 7 years ago

Not relevant. Close it.