Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
Integrate FlowJs with angular 2?

I know there is no direct integration of FlowJs with angular2 so i am trying to implement it by following ways but didn't get any success:

By Declare direct:

Included flow.js script file in index.html and following is the code of component.ts file:

import { Component, OnInit } from '@angular/core';
declare var Flow: any;

@Component({
    selector: 'dashboard-page',
    templateUrl: 'dashboard.component.html'
})

export class DashboardComponent implements OnInit {
    public message: string;

    constructor() {
        this.message = 'Dashboard';
    }
    ngOnInit() {
        var flow = new Flow({
            target: '/api/photo/redeem-upload-token',
            query: { upload_token: 'my_token' }
        });
    }
}

In this its giving me error: ' Flow is not defined'

By using @typings:

I have installed the @typings by @types/flowjs and then installed flow.js by using "npm install --save-dev @flowjs/flow.js" and then i have written following code in my component:

import { Component, OnInit } from '@angular/core';
import * as Flow from "@types/flowjs"; 
//or

//import * as Flow from "flowjs"; @Component({ selector: 'dashboard-page', templateUrl: 'dashboard.component.html' })

export class DashboardComponent implements OnInit {
    public message: string;

    constructor() {
        this.message = 'Dashboard';
    }
    ngOnInit() {
        var flow = new Flow({
            target: '/api/photo/redeem-upload-token',
            query: { upload_token: 'my_token' }
        });
    }

}

But in this its giving an error: "/node_modules/@types/flowjs/index.d.ts' is not a module".

How can i implement FlowJs with angular2?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda