Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谢谢你看我的问题。
所以,我在 2 个地方有一个 1.6 角度的组件,当我在其中一个上更改变量时,我也想在第二个地方更改。
你知道我该怎么做吗?
问候, 安德烈
您可以使用服务来共享数据。或者您可以通过 $rootScope 广播事件并将您的数据作为这些事件的有效负载发送。