Skip to main content
Version: 2.x

HostController.removeBehavior() method

@microsoft/fast-element > HostController > removeBehavior

HostController.removeBehavior() method

Removes the behavior from the component.

Signature:

removeBehavior(behavior: HostBehavior<TSource>, force?: boolean): void;

Parameters

Parameter

Type

Description

behavior

HostBehavior<TSource>

The behavior to remove.

force

boolean

(Optional) Forces removal even if this behavior was added more than once.

Returns:

void