@@ -27,15 +27,15 @@ let nextId = 0;
2727 */
2828@Injectable ( )
2929export class AccordionItem implements OnDestroy {
30- /** Event emitted every time the MdAccordianChild is closed. */
30+ /** Event emitted every time the MdAccordionChild is closed. */
3131 @Output ( ) closed = new EventEmitter < void > ( ) ;
32- /** Event emitted every time the MdAccordianChild is opened. */
32+ /** Event emitted every time the MdAccordionChild is opened. */
3333 @Output ( ) opened = new EventEmitter < void > ( ) ;
34- /** Event emitted when the MdAccordianChild is destroyed. */
34+ /** Event emitted when the MdAccordionChild is destroyed. */
3535 @Output ( ) destroyed = new EventEmitter < void > ( ) ;
36- /** The unique MdAccordianChild id. */
36+ /** The unique MdAccordionChild id. */
3737 readonly id = `cdk-accordion-child-${ nextId ++ } ` ;
38- /** Whether the MdAccordianChild is expanded. */
38+ /** Whether the MdAccordionChild is expanded. */
3939 @Input ( ) get expanded ( ) : boolean { return this . _expanded ; }
4040 set expanded ( expanded : boolean ) {
4141 // Only emit events and update the internal value if the value changes.
@@ -44,10 +44,10 @@ export class AccordionItem implements OnDestroy {
4444 if ( expanded ) {
4545 this . opened . emit ( ) ;
4646 /**
47- * In the unique selection dispatcher, the id parameter is the id of the CdkAccordonItem ,
47+ * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem ,
4848 * the name value is the id of the accordion.
4949 */
50- let accordionId = this . accordion ? this . accordion . id : this . id ;
50+ const accordionId = this . accordion ? this . accordion . id : this . id ;
5151 this . _expansionDispatcher . notify ( this . id , accordionId ) ;
5252 } else {
5353 this . closed . emit ( ) ;
@@ -66,14 +66,14 @@ export class AccordionItem implements OnDestroy {
6666 constructor ( @Optional ( ) public accordion : CdkAccordion ,
6767 private _changeDetectorRef : ChangeDetectorRef ,
6868 protected _expansionDispatcher : UniqueSelectionDispatcher ) {
69- this . _removeUniqueSelectionListener =
70- _expansionDispatcher . listen ( ( id : string , accordionId : string ) => {
71- if ( this . accordion && ! this . accordion . multi &&
72- this . accordion . id === accordionId && this . id !== id ) {
73- this . expanded = false ;
74- }
75- } ) ;
76- }
69+ this . _removeUniqueSelectionListener =
70+ _expansionDispatcher . listen ( ( id : string , accordionId : string ) => {
71+ if ( this . accordion && ! this . accordion . multi &&
72+ this . accordion . id === accordionId && this . id !== id ) {
73+ this . expanded = false ;
74+ }
75+ } ) ;
76+ }
7777
7878 /** Emits an event for the accordion item being destroyed. */
7979 ngOnDestroy ( ) {
0 commit comments