Skip to content

Conversation

@chuckjaz
Copy link
Contributor

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit-message-format
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    This adds a static implementation of the ReflectorReader API that allows constructing metadata from the persistent format produced by the MetadataCollector in tools. This implementation can be passed to DirectiveResolver, PipeResolver and ViewResolver which then can be passed to RuntimeMetadataResolver to produce the CompileDirectiveMetadata and CompilePipeMetadata necessary to parse a template with TemplateParser without loading or running the corresponding modules.
  • What is the current behavior? (You can also link to an open issue here)
    n/a
  • What is the new behavior (if this is a feature change)?
    TemplateParser can be used to compile a template without requiring the modules referenced being loaded. This is particularly helpful when the compiler needs to run in a more trusted environment than the template being compiled or when the template is for an incomplete type such as in an editor when using the parser for diagnostics and completions.
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    No.
  • Other information:
    Added a static reflector that uses metadata produced during build
    or, additionally, directly from typescript, to produce the metadata
    used by Angular code generation compiler.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you give this a better return type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a map in dart. How do I specify, more specifically, what the map must contain?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the special builtin {[key:KeyType]:ValueType} that will work in TS and be converted into a Map via ts2dart

@tbosch tbosch added pr_state: LGTM action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Mar 30, 2016
Added a static reflector that uses metadta produced during build
or, additionally, directly from typescript, to produce the metadata
used by Angular code generation compiler.
@chuckjaz chuckjaz added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Mar 31, 2016
@mary-poppins
Copy link

Merging PR #7813 on behalf of @jeffbcross to branch presubmit-jeffbcross-pr-7813.

@jeffbcross
Copy link
Contributor

Closed with 0dbf959

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants