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

282
Views
cómo usar el asistente inteligente con angular

Estoy tratando de usar smart-wizard con angular 12 y tengo algunos problemas para que funcione. Estos son los pasos que seguí:

  • npm instalar asistente inteligente
  • Luego importé el asistente inteligente en mi componente en el que quiero usarlo.

 import { Component, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { smartWizard } from 'node_modules/smartwizard'; import * as $ from "jquery"; @Component({ selector: 'app-start-up-wizard', templateUrl: './start-up-wizard.component.html', styleUrls: ['./start-up-wizard.component.scss'] }) export class StartUpWizardComponent implements OnInit { constructor(public dialogRef: MatDialogRef < StartUpWizardComponent > ) {} ngOnInit(): void { console.log("reaching here"); $('#smartwizard').smartWizard(); } onClose(): void { this.dialogRef.close(); } }
 <div id="smartwizard"> <ul> <li><a href="">Step Title 1<br /><small>Step Description 1</small></a></li> <li><a href="">Step Title 2<br /><small>Step Description 2</small></a></li> <li><a href="">Step Title 3<br /><small>Step Description 3</small></a></li> <li><a href="">Step Title 4<br /><small>Step Description 4</small></a></li> <li><a href="">Step Title 5<br /><small>Step Description 5</small></a></li> </ul> <div> <div id="step1"> Step Content 1 </div> <div id="step2"> Step Content 2 </div> <div id="step3"> Step Content 3 </div> <div id="step4"> Step Content 4 </div> <div id="step5"> Step Content 5 </div> </div> </div> <a (click)="onClose()" class="btn btn-dark" style="margin-left: 5px;color:white;">Close</a>

Esperaba que funcionara, pero recibo un error en la consola que dice "TypeError: jquery__WEBPACK_IMPORTED_MODULE_0__(...).smartWizard no es una función en StartUpWizardComponent.ngOnInit", que no entiendo después de que npm instale e importe el asistente inteligente. debería haber estado disponible para el componente.

about 4 years ago · Juan Pablo Isaza
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!