Browse Source

update: modifier updates

pull/19413/head
sumeyyeKurtulus 2 years ago
parent
commit
a826f0bdd9
  1. 2
      npm/ng-packs/apps/dev-app/src/app/home/home.component.ts
  2. 23
      npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts
  3. 2
      npm/ng-packs/packages/theme-basic/src/lib/components/application-layout/application-layout.component.ts

2
npm/ng-packs/apps/dev-app/src/app/home/home.component.ts

@ -6,7 +6,7 @@ import { Component, inject } from '@angular/core';
templateUrl: './home.component.html',
})
export class HomeComponent {
private authService = inject(AuthService);
protected readonly authService = inject(AuthService);
loading = false;
get hasLoggedIn(): boolean {

23
npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts

@ -17,19 +17,19 @@ import { DYNAMIC_LAYOUTS_TOKEN } from '../tokens/dynamic-layout.token';
template: ` <ng-container *ngIf="isLayoutVisible" [ngComponentOutlet]="layout"></ng-container> `,
providers: [SubscriptionService],
})
export class DynamicLayoutComponent implements OnInit {
export class DynamicLayoutComponent {
layout?: Type<any>;
layoutKey?: eLayoutType;
readonly layouts = inject(DYNAMIC_LAYOUTS_TOKEN);
isLayoutVisible = true;
private readonly router = inject(Router);
private readonly route = inject(ActivatedRoute);
private readonly routes = inject(RoutesService);
private localizationService = inject(LocalizationService);
private replaceableComponents = inject(ReplaceableComponentsService);
private subscription = inject(SubscriptionService);
private routerEvents = inject(RouterEvents);
protected readonly router = inject(Router);
protected readonly route = inject(ActivatedRoute);
protected readonly routes = inject(RoutesService);
protected readonly localizationService = inject(LocalizationService);
protected readonly replaceableComponents = inject(ReplaceableComponentsService);
protected readonly subscription = inject(SubscriptionService);
protected readonly routerEvents = inject(RouterEvents);
constructor(@Optional() @SkipSelf() dynamicLayoutComponent: DynamicLayoutComponent) {
if (dynamicLayoutComponent) {
@ -40,13 +40,6 @@ export class DynamicLayoutComponent implements OnInit {
this.listenToLanguageChange();
}
ngOnInit(): void {
if (this.layout) {
return;
}
// this.getLayout();
}
private checkLayoutOnNavigationEnd() {
const navigationEnd$ = this.routerEvents.getNavigationEvents('End');
this.subscription.addOne(navigationEnd$, () => this.getLayout());

2
npm/ng-packs/packages/theme-basic/src/lib/components/application-layout/application-layout.component.ts

@ -10,7 +10,7 @@ import { LayoutService } from '../../services/layout.service';
providers: [LayoutService, SubscriptionService],
})
export class ApplicationLayoutComponent implements AfterViewInit {
public service = inject(LayoutService);
public readonly service = inject(LayoutService);
// required for dynamic component
static type = eLayoutType.application;

Loading…
Cancel
Save