docs: edit EventEmitter name in styleguide (#33923)
Fixes #33890 PR Close #33923
This commit is contained in:
parent
ed55355363
commit
1ab2ebc719
|
@ -10,11 +10,11 @@ import { Component, EventEmitter } from '@angular/core';
|
|||
'label'
|
||||
],
|
||||
outputs: [
|
||||
'change'
|
||||
'heroChange'
|
||||
]
|
||||
})
|
||||
export class HeroButtonComponent {
|
||||
change = new EventEmitter<any>();
|
||||
heroChange = new EventEmitter<any>();
|
||||
label: string;
|
||||
}
|
||||
// #enddocregion example
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||
template: `<button>{{label}}</button>`
|
||||
})
|
||||
export class HeroButtonComponent {
|
||||
@Output() change = new EventEmitter<any>();
|
||||
@Output() heroChange = new EventEmitter<any>();
|
||||
@Input() label: string;
|
||||
}
|
||||
// #enddocregion example
|
||||
|
|
|
@ -8,7 +8,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||
})
|
||||
export class HeroButtonComponent {
|
||||
// Pointless aliases
|
||||
@Output('changeEvent') change = new EventEmitter<any>();
|
||||
@Output('heroChangeEvent') heroChange = new EventEmitter<any>();
|
||||
@Input('labelAttribute') label: string;
|
||||
}
|
||||
// #enddocregion example
|
||||
|
|
|
@ -8,7 +8,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||
})
|
||||
export class HeroButtonComponent {
|
||||
// No aliases
|
||||
@Output() change = new EventEmitter<any>();
|
||||
@Output() heroChange = new EventEmitter<any>();
|
||||
@Input() label: string;
|
||||
}
|
||||
// #enddocregion example
|
||||
|
|
|
@ -2972,7 +2972,7 @@ in those editors that support it; it won't help with CSS styles.
|
|||
|
||||
|
||||
**Why?** If you ever need to rename the property or event name associated with
|
||||
`@Input` or `@Output`, you can modify it in a single place.
|
||||
`@Input()` or `@Output()`, you can modify it in a single place.
|
||||
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue