baselayout.ts
Код: Выделить всё
export class BaseLayoutComponent implements AfterViewInit
{
public readonly navJson: string = AppConfig.get('baseProjectUrl') + '/assets/jsons/navigation.json';
loaded: number = 0; // loaded: boolean = false;
constructor()
{ }
ngAfterViewInit()
{ this.LoadLists(); }
LoadLists()
{
fetch(this.navJson).then(res => res.json()).then(collection =>
{ this.navigation = collection; });
setTimeout(()=> { this.loaded++; }, 2000); // this.loaded = true; }, 2000);
}
< /code>
baselayout.html
0 }">
[img]assets/images/Logo.svg[/img]
{{ loaded }}
Подробнее здесь: https://stackoverflow.com/questions/796 ... angular-19
Мобильная версия