Angular 2 ng-bootstrap Modal: How to pass data to entry component

前端 未结 3 747
抹茶落季
抹茶落季 2021-01-02 02:12

I\'m trying to send data to a custom modal content component so I can call it from any other component and not repeat code. I\'m new to Angular 2 and have followed the \"Com

3条回答
  •  粉色の甜心
    2021-01-02 02:40

    Just provide a service and inject it to VideoModalComponent and PageComponent then you can use this service to communicate.

    See https://angular.io/docs/ts/latest/cookbook/component-communication.html#!#bidirectional-service for more details and examples.

提交回复
热议问题