0

I am very new to Angular and I am trying to show a table based on toggle button value. i used angular material to create a toggle button, but i am not able to figure out on how to pass this data onto my controller.

Any help would be appreciated. Please find my code below Thanks in Advance...!!!

<mat-button-toggle-group #group="matButtonToggleGroup"[(value)]="groupValue">
   <mat-button-toggle value="active">Active</mat-button-toggle>
   <mat-button-toggle value="inactive">Inactive</mat-button-toggle>
</mat-button-toggle-group>

1 Answer 1

1

You can use onFilterChange

<mat-button-toggle-group 
      (change)="onFilterChange(group.value)" 
      [value]="groupValue"
      #group="matButtonToggleGroup"
>
Sign up to request clarification or add additional context in comments.

4 Comments

So it means I will have to trigger an event and capture it from there
Yes you need a function
Thanks for guiding Sajeetharan, I was thinking we will have something like $scope here as well..!!!
$scope is not there in angular4 , Mark if the answer helped

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.