This repository was archived by the owner on Jun 21, 2025. It is now read-only.
Async web components load as partitioned output.
Breaking changes
Old services:
import {RWSInject, ApiService, ApiServiceInstance, RWSView} from 'rws-js-client
@RWSView('your-tag')
class YourComponent extends RWSViewComponent {
someMethod(url: string): void
{
ApiService.get(url);
}
}New (default service):
import { RWSViewComponent, RWSView } from 'rws-js-client
@RWSView('your-tag')
class YourComponent extends RWSViewComponent {
someMethod(url: string): void
{
this.apiService.get(url);
}
}
Default services: https://github.com/papablack/rws-client/blob/7d16d9c6d83c81c9fe470eb0f507756bc6c71b35/src/components/_component.ts#L58
New (custom service):
import {
NotifyService, RWSView, RWSViewComponent,
WSService, ApiService, ConfigService,
ConfigServiceInstance, UtilsServiceInstance, ApiServiceInstance,
UtilsService, DOMServiceInstance, DOMService,
NotifyServiceInstance, WSServiceInstance, RoutingService,
RoutingServiceInstance, RWSInject
} from 'rws-js-client';
import DateService, {DateServiceInstance} from '../../my-custom-services/DateService';
@RWSView('your-tag')
class YourComponent extends RWSViewComponent {
constructor(
@RWSInject(DateService) protected dateService: DateServiceInstance,
@RWSInject(ConfigService) protected config: ConfigServiceInstance,
@RWSInject(RoutingService) protected routingService: RoutingServiceInstance,
@RWSInject(DOMService) protected domService: DOMServiceInstance,
@RWSInject(UtilsService) protected utilsService: UtilsServiceInstance,
@RWSInject(ApiService) protected apiService: ApiServiceInstance,
@RWSInject(WSService) protected wsService: WSServiceInstance,
@RWSInject(NotifyService) protected notifyService: NotifyServiceInstance
) {
super(config, routingService, domService, utilsService, apiService, wsService, notifyService);
applyConstructor(this); //fix-incoming: DI constructor data inheritance problem - applyConstructor in super is bugged. Need tmp workaround.
}
someMethod(url: string): void
{
this.dateService.get(url);
}
}