### File

`src/accordion/accordion.component.ts`

### Description

See demo

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

### Implements

`AfterContentInit`

### 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:29

### Methods

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

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

### Properties

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

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

### Accessors

skeleton
get `skeleton()`
Defined in src/accordion/accordion.component.ts:34
set `skeleton(value: any)`
Defined in src/accordion/accordion.component.ts:29
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>
     */
    @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 ""