Skip to content

feat(@ngtools/webpack): remove annotations - #4301

Merged
hansl merged 1 commit into
angular:masterfrom
hansl:annotations
Jan 31, 2017
Merged

hansl merged 1 commit into
angular:masterfrom
hansl:annotations

Conversation

@hansl

@hansl hansl commented Jan 31, 2017

Copy link
Copy Markdown
Contributor

And move constructor argument types to a static property understood by Angular.

Fixes #4284
Fixes #4136
Fixes #3751

And move constructor arguments to a static property understood by
Angular.
@hansl
hansl merged commit 439dcd7 into angular:master Jan 31, 2017
@keyiis

keyiis commented Jan 31, 2017

Copy link
Copy Markdown

When will it be released?

@christopherthielen

Copy link
Copy Markdown

UI-Router uses the metadata added by @Input to determine if a routed component can have data bound to it and if so, what the class property is (@Input() property) and what the input name is (@Input('name') property).

By stripping the decorators, we can no longer automatically bind resolve data to the routed component.

The idea behind using the @Input decorator is that any dumb component can be written as a normal component with inputs. Then, the component can be used in a parent component as normal using data binding (<child [data]="datafromparent"></child>), OR it can be routed to where the data is supplied from async resolve:

{ 
  component: Child, 
  resolve: [
    { token: 'data', resolveFn: asyncData }
  ]
}

@keyiis

keyiis commented Feb 6, 2017

Copy link
Copy Markdown

@hansl i already update @ngtools/webpack & @angular/cli to last version,but aot still not work!

MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this pull request Feb 9, 2017
And move constructor arguments to a static property understood by Angular.
@hansl
hansl deleted the annotations branch August 2, 2018 19:57
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

5 participants