Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions libs/route-pages/blog-portfolio/src/blog.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ChangeDetectorRef, Component, Input, OnDestroy} from '@angular/core';
import {GetArticlesService, titleRefactoring} from "@valor-software/common-docs";
import { AfterViewInit, ChangeDetectorRef, Component, Input, OnDestroy } from '@angular/core';
import { GetArticlesService, titleRefactoring } from "@valor-software/common-docs";
import { Subscription } from "rxjs";
import { IArticle } from "@valor-software/common-docs";
import { Router } from "@angular/router";
Expand All @@ -24,17 +24,17 @@ export const Languages = {
selector: 'blog-block',
templateUrl: './blog.component.html'
})
export class BlogComponent implements OnDestroy {
export class BlogComponent implements OnDestroy, AfterViewInit {
sortList: string[] = [];
sortLang: string[] =[];
sortLang: string[] = [];
$articles?: Subscription;
articles?: IArticle[];
sortArticles?: IArticle[] = [];
activeIndex: string[] = ['en'];
activeIndex: string[] = [];
showAll = false;
isCollapsed = true;

@Input() set _articles (value: IArticle[]) {
@Input() set _articles(value: IArticle[]) {
this.articles = Object.assign(value);
this.sortArticles = Object.assign(value);
}
Expand All @@ -47,6 +47,9 @@ export class BlogComponent implements OnDestroy {
this.getSortKeys();
}

ngAfterViewInit(): void {
this.toggleLanguage('en');
}

getSortKeys() {
const sortSet = new Set<string>();
Expand Down