Represents the Angular Button Component.
<button ejs-button>Button</button>
string
Defines the text content
of the Button element.
<button ejs-button [content]="content_normal">Normal</button>
import { Component, ViewEncapsulation } from "@angular/core";
import { ButtonComponent } from "@syncfusion/ej2-angular-buttons";
/**
* Default Button Controller
*/
@Component({
selector: "app-root",
templateUrl: "app.component.html",
styleUrls: ["app.component.css"],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
public content_normal = "Normal";
constructor() {}
}
Defaults to ""
string
Defines class/multiple classes separated by a space in the Button element. The Button types, styles, and
size can be defined by using
this
.
<button ejs-button [cssClass]="flat_class" isPrimary="true">Flat</button>
import { Component, ViewEncapsulation } from "@angular/core";
import { ButtonComponent } from "@syncfusion/ej2-angular-buttons";
/**
* Default Button Controller
*/
@Component({
selector: "app-root",
templateUrl: "app.component.html",
styleUrls: ["app.component.css"],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
public flat_class = "e-flat";
constructor() {}
}
Defaults to ""
boolean
Specifies a value that indicates whether the Button is disabled
or not.
Defaults to false.
boolean
Defines whether to allow the cross-scripting site or not.
Defaults to false
boolean
Enable or disable persisting component’s state between page reloads.
Defaults to false
boolean
Enable or disable rendering component in right to left direction.
Defaults to false
string
Defines class/multiple classes separated by a space for the Button that is used to include an icon. Buttons can also include font icon and sprite image.
Defaults to ""
string
| IconPosition
Positions the icon before/after the text content in the Button. The possible values are:
Defaults to IconPosition.Left
boolean
Allows the appearance of the Button to be enhanced and visually appealing when set to true
.
Defaults to false
boolean
Makes the Button toggle, when set to true
. When you click it, the state changes from normal to active.
Defaults to false
Click the button element its native method
Returns void
Destroys the widget.
Returns void
Sets the focus to Button its native method
Returns void
EmitType<Event>
Triggers once the component rendering is completed.