Angular 4 pass data between 2 not related components

前端 未结 5 1585
栀梦
栀梦 2020-11-27 13:47

I have a questions about passing data in Angular.

First, I don\'t have a structure as

5条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 14:00

    There are two solutions for this.

    1. This can be done through shared service by using observable's.

    2. You can use ngrx/store for this. This is similar to Redux arch. You will be getting data from state.

提交回复
热议问题