You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Objects (components and scopes) are made resolvable by calling Scope.prototype._makeResolvable(). This method is called in the following places:
Scope.prototype._createScopeItem()
scope.componentFactory.initInstance()
pluginApi.addComponent()
pluginApi.addInstance()
The first call causes _makeResolvable() to be called for each statically created component and scope (those created by wiring a spec); and the second call causes it to be called for each component, either statically or dynamically created. By "dynamically created" I mean it's created by calling wire() in a plugin method.
So for statically created components, _makeResolvable() is called twice (both 1 and 2 are called); for statically created scopes, 1 is called; for dynamically created components, 2 is called; and for dynamically created scopes, none is called, so the scope isn't resolvable.
For example, if I have the following statement in a plugin method:
wire({example:{literal:'example'}}, 'myscope');
This scope is created but not made resolvable.
Additionally, pluginApi.addComponent() calls scope.componentFactory.processComponent(), which in turn calls scope.componentFactory.initInstance(). So in this case _makeResolvable is also called twice (2 and 3).
The text was updated successfully, but these errors were encountered:
Additionally, components that are dynamically wired and are plain values or reference another component, for example, by calling wire(3, 'newcomp') or wire({$ref: 'another'}, 'newcomp') in a plugin, are not made resolvable.
Objects (components and scopes) are made resolvable by calling Scope.prototype._makeResolvable(). This method is called in the following places:
The first call causes _makeResolvable() to be called for each statically created component and scope (those created by wiring a spec); and the second call causes it to be called for each component, either statically or dynamically created. By "dynamically created" I mean it's created by calling wire() in a plugin method.
So for statically created components, _makeResolvable() is called twice (both 1 and 2 are called); for statically created scopes, 1 is called; for dynamically created components, 2 is called; and for dynamically created scopes, none is called, so the scope isn't resolvable.
For example, if I have the following statement in a plugin method:
wire({example:{literal:'example'}}, 'myscope');
This scope is created but not made resolvable.
Additionally, pluginApi.addComponent() calls scope.componentFactory.processComponent(), which in turn calls scope.componentFactory.initInstance(). So in this case _makeResolvable is also called twice (2 and 3).
The text was updated successfully, but these errors were encountered: