Skip to content

Unable to use preventdefault/Stoppropagation to restrict the switch in particular condtion #5

@priteshbonde

Description

@priteshbonde

html:-

<bSwitch [(ngModel)]="club.plans[0].IsFeatured"
(onChangeState)="updateclubs($event, club)">

Component Code:-

updateclubs(event, club) {

    if (club.Isactive) {
      event.preventDefault();
    }

i need to prevent the switch incase when club is inactive. StopPropagation method is also not available.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions