added getters from main app element to other elements

This commit is contained in:
Fran Jurmanović
2021-06-03 19:18:50 +02:00
parent 7e3332e32c
commit b36e7f0ca6
6 changed files with 38 additions and 14 deletions

View File

@@ -11,13 +11,11 @@ class AppLinkElement extends BaseComponentElement {
@attr goBack: string;
@attr title: string;
@target main: Element;
routerService: RouterService;
constructor() {
super();
}
elementConnected = (): void => {
this.routerService = this.appMain?.routerService;
if (!this.title && this.innerText) {
const _slottedText = this.innerText;
this.innerText = null;