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

    directive not working

    Help
    1
    2
    816
    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.
    • Zambiorix
      Zambiorix last edited by Zambiorix

      Hi,

      I have created my own vue component with the following name:

      export default {
      
          name: 'gt-tb-back',
      

      and using it like this

      import { GTToolbarBack } from '../../components/toolbar'
      
      import {
          QBtn
      } from 'quasar'
      
      export default {
      
          components: {
              QBtn,
              'gt-tb-back': GTToolbarBack
          },
      

      If I do not add the directive in front of GTToolbarBack when registering the component, I cannot use it in my template (unknown custom element error). What do I have to do to make it work so that the directive is correctly registered and I do not have to specify the name ? (just like the QBtn component for example)
      I have looked in the Quasar code and I cannot find what I am doing wrong or different…

      Thanks!

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

        Found it …

        I have to register the components first

        Vue.component('gt-tb-back', GTToolbarBack)
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post