If you want to bind the dir attribute, you can add this to the template.html:
<input type="text" [dir]="myDir" />
and in your component.ts:
@Component({
selector: "my-app",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"]
})
export class AppComponent {
myDir = "rtl";
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…