I'm working on an onboarding screen with Intro.js and need help with receiving user input. I've been trying different methods like [(ngModel)] = checked, [(checked)] = checked, (checked) = checked, but haven't had any success. Can anyone provide guidance on how to achieve this or confirm if it's possible?
import {Injectable} from '@angular/core';
import * as IntroJs from 'intro.js/intro.js';
@Injectable({
providedIn: 'root'
})
export class IntrojsService {
introJs = null;
checked = false;
constructor() {
}
welcome() {
this.introJs = IntroJs();
this.introJs.start();
this.introJs.setOptions({
tooltipClass: 'customTooltip',
steps: [
{
title: '<img src="../../assets/default-logo.png" alt="logo" class="logo">',
intro: '<div class="tooltip-container">\n' +
'\n' +
' <div class="tooltip-body">\n' +
' <p>Welcome to the site!</p>\n' +
' <input type="checkbox" ngModel #checked"/>\n' + //input here
' </div>\n' +
'</div>\n',
},
],
}).oncomplete(() => {
console.log(this.checked);
}).start();
}
}
I want the value in the input to be assigned to the "checked" property of the class.