No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to write a custom component and use it?

    Help
    3
    4
    5292
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • s-light
      s-light last edited by

      Hello 🙂

      iam really new to this quasar and vue world…
      so evenutally its so easy i just don’t know jet…

      i have started my app with the getting-started guide with the CLI install

      now after some time playing around with various things
      (see https://github.com/s-light/quasar_test)
      i want to create a new component to use in one of my page files.
      so i created a file at
      src/components/CanvasTextRender.vue
      and tried to use it in
      src/pages/font.vue

      but it seems i missing something basic…
      and i don’t know how to search for a tutorial or similar info on this…

      hope someone can push me in the right direction… 🙂

      sunny greetings
      stefan

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by s.molinari

        Hi Stefan,

        We recommend beginners to Vue and Quasar learn the basics of Vue first. Once you get that down, you’ll understand how to implement your own components in Quasar.

        Here is the course: https://www.udemy.com/vuejs-2-the-complete-guide

        Scott

        1 Reply Last reply Reply Quote 0
        • lucasfernog
          lucasfernog last edited by

          Hello s-light,

          You need to register the component. Check out how Quasar docs do it (this is global registration, but you can do it locally too): https://github.com/quasarframework/quasar/blob/dev/docs/src/boot/components.js

          And the VueJS documentation for it: https://vuejs.org/v2/guide/components-registration.html

          1 Reply Last reply Reply Quote 1
          • s-light
            s-light last edited by s-light

            Thanks Scott & lucasfernog!

            i have read the Vue-beginners guide… and are happy to play-around and learn from the documentation 😉
            (if i find the correct part 😉 )

            the link to the example boot/components.js is great!
            → that was the missing point 😉
            and the components-registration thing was the doc i searched for!
            seems i have to search also more in the Vue documentation!!
            especially Local-Registration-in-a-Module-System did it for me 😉

            Thanks! - now it works!

            sunny greetings
            stefan

            1 Reply Last reply Reply Quote 0
            • First post
              Last post