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

98
Views
Usando ‎Sirena en proyecto angular

Soy principiante en ‎Mermaid y estoy tratando de usar ‎Mermaid en mi proyecto angular. Lo agrego en mi html y funciona.

 <script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/9.0.1/mermaid.min.js"></script> <div class="mermaid" id="mermaidHTML"> stateDiagram-v2 [*] --> Still Still --> [*] Still --> Moving Moving --> Still Moving --> Crash Crash --> [*] </div>

pero ahora quiero editar o crear un nuevo archivo ‎Sirena en .ts y mostrarlo en mi navegador y no sé cómo hacerlo. .innerHTML e .innerText para editar el texto de ‎Mermaid, pero no funcionó.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Arreglé esto creando una función para crear el gráfico de sirena en lugar de editar el anterior. Agrego esto a mi archivo .ts.

 stringFlowChart: any = []; createFlowchart() { this.flowChart = [ "stateDiagram-v2 [*] --> still still --> [test]", "stateDiagram-v2 [*] --> still still --> [*]", "stateDiagram-v2 [*] --> still" ]; //or use a loop this.stringFlowChart[0] = this.flowChart[0]; this.stringFlowChart[1] = this.flowChart[1]; this.stringFlowChart[2] = this.flowChart[2]; }

y en mi código html, agregué esto:

 <div style="margin-top: 50px"> <div *ngFor="let flow of stringFlowChart; let i = index"> index is:{{i}} <div class="mermaid"> {{ flow }} </div> </div> </div>

de esta manera, agregué una serie de gráficos de sirenas

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