Z
Z
Zenko2020-11-26 22:19:47
JavaScript
Zenko, 2020-11-26 22:19:47

How to connect Typed JS to VUE JS?

I connect as it is written in the instruction ( https://github.com/mattboldt/typed.js/blob/master/... ) and I get an error:


[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> at src/App.vue



What am I doing wrong?

In main.js
import { VueTypedJs } from 'vue-typed-js'
Vue.use(VueTypedJs)

In app.vue
<vue-typed-js :strings="phrases" :typeSpeed="typeSpeed" :startDelay="100" :loop="true">
        <h1>Hello <span class="typing"></span><span class="typed-cursor">|</span></h1>
    </vue-typed-js>

If I register a component an error occurs:

./src/App.vue
Module Error (from ./node_modules/eslint-loader/index.js):

/home/docs/src/App.vue
35:5 error 'VueTypedJs' is not defined no-undef

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2020-11-26
@Zenko

And now read the doc carefully again: https://github.com/Orlandster/vue-typed-js#default...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question