Angular2 global service provider

后端 未结 5 1549
轮回少年
轮回少年 2020-12-14 20:49
/app
        - app.component.ts 
        - app.component.html (hide/show: menu bar)
        - app.global.service.ts (Public varible LoginSuccess:boolean)
        - m         


        
5条回答
  •  执念已碎
    2020-12-14 21:15

    I will just add, because i was stuck at this point to, although i used a Singelton, you also have to use the Angular routing strategie:

    You can't use href="../my-route"

    cause this starts the whole application new:

    instead you have to use: routerLink="../my-route"

提交回复
热议问题