Having trouble finding the most updated way to access a DOM element with Angular2, Ionic2, and TypeScript.
Question: How can I access sketchElement
in the sign() function?
Template in Settings.ts:
<button full class="top-button-margin" (click)="sign()">
Sign
<ion-icon name="create"></ion-icon>
</button>
<img id="sketchElement" src="img/logo.png" padding *ngIf="showSignatureView">
Settings.ts class:
@Page({
templateUrl: 'build/pages/settings/settings.html'
})
export class SettingsPage {
private currentUser: User = <User>{};
private loggingOut: boolean = false;
private currentConnection: string = "";
private showSignatureView: boolean = false;
constructor(
private _platform: Platform,
private _nav: NavController,
private _events: Events,
private _LoginService: LoginService,
private _SessionService: SessionService,
private _UIService: UIService) {
}
sign() {
// Need to find a way to access sketchElement and its properties here.
}
}