Hi Milos,
Thanks for contacting Syncfusion support.
We have checked with your query. We have suggest to use <button></button> tag to create the button with prefixIcon and suffixIcon. Please refer the below code in your sample to achieve your requirement.
app.component.html:
<button type="button" [contentType]="imageonly" [prefixIcon]="deleteicon" ej-button ></button>
<button type="button" contentType="imageonly" [prefixIcon]="deleteicon" ej-button ></button>
<button type="button" contentType="imageonly" prefixIcon="e-icon e-delete" ej-button ></button>
|
app.component.ts:
import { Component, ViewEncapsulation} from '@angular/core';
@Component({
selector: 'ej-app',
templateUrl: './app.component.html',
})
export class AppComponent {
imageonly:any;
deleteicon:any;
constructor() {
this.imageonly="imageonly";
this.deleteicon="e-icon e-delete";
}
} |
In the above code example, we have used <button></button> tag to create the button with Icon. Also, you can achieve the property binding to the control by using “[]” (“square bracket”) in app.component.html file and define the binding value in the app.component.ts file.
To know more about binding of the Syncfusion component in Angular please refer the below UG documentation.
For your convenience, we have prepared the sample based on your requirement. Please get the sample from the below location.
To know more about how to create our component in Angular please refer the below demo link. We have showcased the demo for our component in the below link.
If still you are facing issues please get back to us with more details that will help us to provide exact solution.
Regards,
Berly B.C