feat(devtools): Modify buildDirectiveForest to call ng.getComponentForest if it exists.#68183
Open
csmick wants to merge 3 commits intoangular:mainfrom
Open
feat(devtools): Modify buildDirectiveForest to call ng.getComponentForest if it exists.#68183csmick wants to merge 3 commits intoangular:mainfrom
csmick wants to merge 3 commits intoangular:mainfrom
Conversation
…rest if it exists.
A new ng global function, ng.getComponentForest, is being added to allow the framework to provide the component forest without writing metadata to the DOM. This will allow devtools to display components that don't render any DOM.
…dexedNode types Add an optional injector property to the DevToolsNode and IndexedNode types. Features that require an injector use the injector stored on the node, if it exists, and fall back to getInjectorFromElementNode if it doesn't.
… properties that will not be included in the forest returned by non-Angular frameworks. Set default values for the `directives`, `element`, `hydration`, and `component.isElement` properties of every `ComponentTreeNode` returned by `ng.getComponentForest` for non-Angular apps.
1f951c8 to
46b51d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
A DOM walk is performed to determine generate the
ComponentTreeNode[]that is displayed in the Components tab in the Angular DevTools Extension.Issue Number: N/A
What is the new behavior?
The
ng.getComponentForestfunction allows application frameworks to return theComponentTreeNode[]that is displayed in the Components tab in the Angular DevTools Extension.Does this PR introduce a breaking change?
Other information