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'
|
'label'
|
||||||
],
|
],
|
||||||
outputs: [
|
outputs: [
|
||||||
'change'
|
'heroChange'
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class HeroButtonComponent {
|
export class HeroButtonComponent {
|
||||||
change = new EventEmitter<any>();
|
heroChange = new EventEmitter<any>();
|
||||||
label: string;
|
label: string;
|
||||||
}
|
}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
@ -7,7 +7,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||||||
template: `<button>{{label}}</button>`
|
template: `<button>{{label}}</button>`
|
||||||
})
|
})
|
||||||
export class HeroButtonComponent {
|
export class HeroButtonComponent {
|
||||||
@Output() change = new EventEmitter<any>();
|
@Output() heroChange = new EventEmitter<any>();
|
||||||
@Input() label: string;
|
@Input() label: string;
|
||||||
}
|
}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
@ -8,7 +8,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class HeroButtonComponent {
|
export class HeroButtonComponent {
|
||||||
// Pointless aliases
|
// Pointless aliases
|
||||||
@Output('changeEvent') change = new EventEmitter<any>();
|
@Output('heroChangeEvent') heroChange = new EventEmitter<any>();
|
||||||
@Input('labelAttribute') label: string;
|
@Input('labelAttribute') label: string;
|
||||||
}
|
}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
@ -8,7 +8,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class HeroButtonComponent {
|
export class HeroButtonComponent {
|
||||||
// No aliases
|
// No aliases
|
||||||
@Output() change = new EventEmitter<any>();
|
@Output() heroChange = new EventEmitter<any>();
|
||||||
@Input() label: string;
|
@Input() label: string;
|
||||||
}
|
}
|
||||||
// #enddocregion example
|
// #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
|
**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>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user