<body> <login-content></login-content> <main-content></main-content> </body> 

Now both html-templates are stupidly present on the page, but how can we load it so that it can be loaded on a click, for example, by replacing and so that the angular will immediately load everything and work without error?

  • What does it mean that both html templates are present on the page ? What could you load on click ? load what? - Grundy
  • Now the content displays both that and that. I need if we have no cookies, then login-content display, if there is then main-content - splincode
  • one
    you can use ng-if , you can use a router - Grundy
  • Now the question is too broad, it is worth specifying it by adding the minimum reproducible example as it is now with comments as we would like - Grundy

0