Skip to content

Support for referencing static variables of a class in the static reflector #10332

Closed

Description

@chuckjaz

I'm submitting a ... (check one with "x")

[ ] bug report
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

class MyComponent {
  static SYMBOL = new OpaqueSymbol(...);
}

@NgModule({
  providers: [{provide: MyComponent.SYMBOL, useValue: 123}]
})
class MyModule{}

The above reports an error in ngc.

Expected/desired behavior

The above code would resolve the OpaqueSymbol declared in MyComponent.

What is the motivation / use case for changing the behavior?

New recommended style for declaring module specific opaque tokens.

Activity

  1. self-assigned this
    on Jul 27, 2016
  2. added a commit that references this issue on Jul 28, 2016
    b58e9ea
  3. angular-automatic-lock-bot commented on Sep 9, 2019

    @angular-automatic-lock-bot

    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.

  4. locked and limited conversation to collaborators on Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions