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

266
Visualizações
Using jquery dotdotdot in ionic3

I am trying to use jQuery plugin in my project. I am using Ionic3

I have already installed jquery , and also downloaded the plugin

npm install jquery --save typings install dt~jquery --global --save

from the plugin docs: I added the script tags in index.html

<head>
 ////
 <script src="assets/jquery/dist/jquery.js" type="text/javascript"></script>
 <script src="assets/jquery.dotdotdot.js" type="text/javascript"></script>// path assets inside www folder where I'd put the file .js
////
</head>

.html: (page)

////
<div id="wrapper">
 <p>"{{summary}}"</p>
</div>

.ts:

import * as $ from 'jquery';

///
ngOnInit(){
    $("#wrapper").dotdotdot({
        ellipsis : '... ',
        wrap : 'word',
        fallbackToLetter: true,
        height: null
    });
}

I get error: Uncaught (in promise): TypeError: __WEBPACK_IMPORTED_MODULE_2_jquery__(...).dotdotdot is not a function

I tried adding both .js and .min.js files , but I get the same error

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You install the same way as the jquery.

Install library dotdotdot.js

npm install dotdotdot --save

Install @types package

npm install --save-dev @types/dotdotdot

Then do

 import * as $ from "dotdotdot";
over 4 years ago · Santiago Trujillo Relatório

0

the proper usage of jquery inside ionic is

import $ from 'jquery';

you can try the same way also in dotdotdot

import dot from "dotdotdot";
over 4 years ago · Santiago Trujillo Relatório
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