2016-08-29 85 views

回答

1

您应该创建一个服务类并将其注入将使用其功能的组件中。

角度对实施服务有很大的教程:

Angular Service Tutorial

+0

非常感谢你,在这种形式没想到 – user26776