Answer the question
In order to leave comments, you need to log in
How to make multiple templates?
I now have the app.component.html template in app.component.ts (this is the main template with its own structure). On the login page, I want to display a different template, how can I do this? you need to do something so that not app.component.html is loaded, but login.component.html
Answer the question
In order to leave comments, you need to log in
Create a separate component and load using routing. app.component.ts is the base and nothing more. To me it looks like it usually
/**
* Основной компонент приложения
* @description Входная точка для основного маршрутизатора
* */
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app',
template: '<router-outlet></router-outlet>'
})
export class AppComponent implements OnInit {
constructor(){}
ngOnInit() {};
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question