Web Components Design Pattern

前端 未结 2 827
悲&欢浪女
悲&欢浪女 2021-01-14 20:07

Anyone have idea about the common design problems we face in web components designs. I have started with Vuejs/ReactJS and Angular 2 but the most common problem I face is co

2条回答
  •  情深已故
    2021-01-14 20:41

    In Angular 2, use services to share data and to communicate between components. For options picker, create a common menu component in your app's shared folder. Pass options array as @Input() to display menu options dynamically and upon click, you can emit ActionId or anything else unique to that action then using pub/sub you can perform any action in any component.

提交回复
热议问题