Skip to content

Conversation

@vsavkin
Copy link
Contributor

@vsavkin vsavkin commented Oct 11, 2015

BREAKING CHANGE

Before <cmp [(prop)]="field"> was desugared to <cmp [prop]="field" (prop)="field=$event">
After <cmp [(prop)]="field"> was desugared to <cmp [prop]="field" (prop-change)="field=$event">

@vsavkin vsavkin force-pushed the change_event_to_event_change branch 2 times, most recently from 672c4cd to 6d6b337 Compare October 11, 2015 02:08
@mhevery
Copy link
Contributor

mhevery commented Oct 11, 2015

For upgrade

  1. find ExportedNg1Component.extractBindings
  2. find var outputNameRename = outputName + ': ' + name;
  3. add var outputNameRenameChange = outputName + ': ' + name + 'Change';
  4. change this.outputsRename.push(outputNameRename); => this.outputsRename.push(outputNameRenameChange);
  5. in integration_spec.ts change twoWayBEmitter: twoWayB => twoWayBEmitter: twoWayBChanged here

I think...

@pkozlowski-opensource
Copy link
Member

Could you add backticks around code samples in the commit message so it shows correctly in the changelog?

@mhevery
Copy link
Contributor

mhevery commented Oct 11, 2015

Also I think you need to rebase.

BREAKING CHANGE

Before

```
<cmp [(prop)]="field"> was desugared to <cmp [prop]="field" (prop)="field=$event">
```

After
```
<cmp [(prop)]="field"> is desugared to <cmp [prop]="field" (prop-change)="field=$event">
```
@vsavkin vsavkin force-pushed the change_event_to_event_change branch from 6d6b337 to d093f11 Compare October 11, 2015 02:56
@vsavkin vsavkin added the action: merge The PR is ready for merge by the caretaker label Oct 11, 2015
@mary-poppins
Copy link

Merging PR #4658 on behalf of @vsavkin to branch presubmit-vsavkin-pr-4658.

@mary-poppins mary-poppins removed the action: merge The PR is ready for merge by the caretaker label Oct 11, 2015
@vsavkin vsavkin closed this in 7c6130c Oct 11, 2015
@rkj
Copy link

rkj commented Nov 24, 2015

Could you provide any rationale why this was changed? Should all events be named with -change suffix moving on?

@0x-r4bbit
Copy link
Contributor

No, not all events have to have -change suffix. Only the ones that can be
used with 2-way binding syntax.

I think the reason for this change was just for semantic reasons. Before
this change, an event that is being used with 2-way syntax would be named
like the property. Having -change as suffix makes it semantically an
action. So this makes sense.

On Tue, Nov 24, 2015, 7:49 PM Roman notifications@github.com wrote:

Could you provide any rationale why this was changed? Should all events be
named with -change suffix moving on?


Reply to this email directly or view it on GitHub
#4658 (comment).

@rkj
Copy link

rkj commented Nov 30, 2015

Well, we still have events named like properties, just we need to change them depending if we want to use 2-way binding sugar. Thanks for comments!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants