### File

`src/accordion/accordion.component.ts`

### Description

See demo

../../iframe.html?id=accordion--basic

### Implements

`AfterContentInit`

### Example

### Metadata

selector | `ibm-accordion`

template

    <ul class="bx--accordion">
    	<ng-content></ng-content>
    </ul>

### Index

###### Properties

- Protected _skeleton
- children

###### Methods

- ngAfterContentInit
- Protected updateChildren

###### Inputs

- skeleton

###### Accessors

- skeleton

### Inputs

`skeleton` | Type : `any`
Defined in src/accordion/accordion.component.ts:33

### Methods

ngAfterContentInit
`ngAfterContentInit()`
Defined in src/accordion/accordion.component.ts:42
Returns : `void`

Protected updateChildren
`updateChildren()`
Defined in src/accordion/accordion.component.ts:46
Returns : `void`

### Properties

Protected _skeleton
`_skeleton: ```
Default value : `false`
Defined in src/accordion/accordion.component.ts:30

children
`children: `QueryList<AccordionItem>``
Type : `QueryList<AccordionItem>`
Decorators : `@ContentChildren(AccordionItem)`
Defined in src/accordion/accordion.component.ts:28

### Accessors

skeleton
get `skeleton()`
Defined in src/accordion/accordion.component.ts:38
set `skeleton(value: any)`
Defined in src/accordion/accordion.component.ts:33

Parameters :

Name | Type | Optional
value | `any` | No

Returns : `void`

    import {
    	Component,
    	Input,
    	ContentChildren,
    	QueryList,
    	AfterContentInit
    } from "@angular/core";
    import { AccordionItem } from "./accordion-item.component";

    /**
     * [See demo](../../?path=/story/accordion--basic)
     *
     * <example-url>../../iframe.html?id=accordion--basic</example-url>
     *
     * @export
     * @class Accordion
     * @implements {AfterContentInit}
     */
    @Component({
    	selector: "ibm-accordion",
    	template: `
    		<ul class="bx--accordion">
    			<ng-content></ng-content>
    		</ul>
    	`
    })
    export class Accordion implements AfterContentInit {
    	@ContentChildren(AccordionItem) children: QueryList<AccordionItem>;

    	protected _skeleton = false;

    	@Input()
    	set skeleton(value: any) {
    		this._skeleton = value;
    		this.updateChildren();
    	}

    	get skeleton(): any {
    		return this._skeleton;
    	}

    	ngAfterContentInit() {
    		this.updateChildren();
    	}

    	protected updateChildren() {
    		if (this.children) {
    			this.children.toArray().forEach(child => child.skeleton = this.skeleton);
    		}
    	}
    }

Legend
Html element
Component
Html element with directive

# result-matching ""

# No results matching ""