![](/img/trans.png)
[英]How to use same functionalities of function present in one component to another based on click to use same class binding in both components in angular
[英]How to use component A functionalities in component B where both are independent?
我有具有所有功能的组件 A,并且需要在组件 B 中使用相同的功能。由于大量代码是在 componentA.ts 中编写的,但不在服务中,所以在这种情况下,如何在不使用服务的情况下使用组件 A 逻辑,而两者都是独立组件。
我在堆栈溢出中看到了很多帖子,但找不到合适的解决方案。
有几种方法可以实现您的目标:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.