Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

139
Views
How do we assign the data of the html input written in the ts file to the property of the class? (Angular+IntroJs)

I'm making an onboarding screen using Intro.js. In this screen, I want to receive an input from the user. However, to do this, when I add an input to the screen of intro.js, I cannot assign the data in it to the property of the class. [(ngModel)] = checked, [(checked)] = checked, (checked) = checked the results I've tried so far and failed, can you help or is this 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();
    }
}

What I want is for the value in the input to be assigned to the "checked" property of the class.

almost 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!