src/app/ui/models/base.component.ts
Abstract class inherited from UI components.
Properties |
Methods |
|
subscriptions |
subscriptions:
|
Type : Subscription[]
|
Default value : []
|
Defined in src/app/ui/models/base.component.ts:9
|
ngOnDestroy |
ngOnDestroy()
|
Defined in src/app/ui/models/base.component.ts:13
|
Returns :
void
|
Abstract ngOnInit |
ngOnInit()
|
Defined in src/app/ui/models/base.component.ts:11
|
Returns :
void
|
Abstract receiveActions |
receiveActions()
|
Defined in src/app/ui/models/base.component.ts:27
|
Subscribes to the actions sent by other components.
Returns :
void
|
Abstract sendActions |
sendActions()
|
Defined in src/app/ui/models/base.component.ts:32
|
Subscribes to the actions sent to other components.
Returns :
void
|
Abstract valueChanges |
valueChanges()
|
Defined in src/app/ui/models/base.component.ts:22
|
Subscribes to the form changes.
Returns :
void
|
import { OnInit, OnDestroy } from "@angular/core";
import { Subscription } from "rxjs";
/**
* Abstract class inherited from UI components.
*/
export abstract class BaseComponent implements OnInit, OnDestroy {
subscriptions: Subscription[] = [];
abstract ngOnInit(): void;
ngOnDestroy(): void {
this.subscriptions.forEach((subscription: Subscription) => {
if (subscription) { subscription.unsubscribe(); }
});
}
/**
* Subscribes to the form changes.
*/
abstract valueChanges(): void;
/**
* Subscribes to the actions sent by other components.
*/
abstract receiveActions(): void;
/**
* Subscribes to the actions sent to other components.
*/
abstract sendActions(): void;
}