There are two ng-app app1 and app2. Can parameters be passed between them?
仅有的幸福2017-06-22 11:55:20
Provide an idea to directly bind a global variable or data structure, and then both apps can access it, which can realize the value transfer function,
三叔2017-06-22 11:55:20
You definitely have this problem, and there are many ways to solve it. The idea is as follows:
1. Use the service of the module to provide public services, and both modules reference the service at the same time
2. Use the module factory, the same as above
3. In addition, define an app3, so that both of your apps depend on this app3 (I really can’t think of it One of the methods)
4. Use the event delivery method $emit (the second method that is really unexpected)