Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor toggle button icon binding performance #5596

Closed
AndreaBarbasso opened this issue Apr 20, 2018 · 2 comments
Closed

Refactor toggle button icon binding performance #5596

AndreaBarbasso opened this issue Apr 20, 2018 · 2 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@AndreaBarbasso
Copy link
Contributor

<span *ngIf="onIcon||offIcon" [class]="getIconClass()"></span>

Easily fixable with class="ui-button-icon-left fa fa-fw {{ checked ? onIcon : offIcon }}"

@cagataycivici cagataycivici self-assigned this Jul 10, 2018
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Jul 10, 2018
@cagataycivici cagataycivici added this to the 6.0.1 milestone Jul 10, 2018
@cagataycivici cagataycivici changed the title Bad practice: function call in one-way binding Refactor toggle button icon binding Jul 11, 2018
@cagataycivici cagataycivici changed the title Refactor toggle button icon binding Refactor toggle button icon binding performance Jul 11, 2018
@cagataycivici
Copy link
Member

Added;

<span *ngIf="onIcon||offIcon" class="ui-button-icon-left" [ngClass]="checked ? this.onIcon : this.offIcon"></span>

@AndreaBarbasso
Copy link
Contributor Author

@cagataycivici I think the code should be [ngClass]="checked ? onIcon : offIcon", dropping this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants