Global vs Local registration

UI Components for Vue
Post Reply
Bindrid
Posts: 7
Joined: 23 Nov 2021, 01:12

23 Nov 2021, 01:52

Why can't I globally register components?

a components section like below works for registering

...
components : {"p-inputtext": inputtext}


but global registration seems to work
Vue.component({"p-inputtext":inputtext}) does not work.

It does not give me an error but get the error when
<p-iinputtext> is read on loading.

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

24 Nov 2021, 15:29

It seems there is a typo issue. Could you try to use this:

Code: Select all

Vue.component("p-inputtext", inputtext)

Bindrid
Posts: 7
Joined: 23 Nov 2021, 01:12

25 Nov 2021, 19:54

no, not a typo. my syntax was wrong. I should be passing in two separate items, not a single object Vue.component("p-menu", menu) not Vue.component({"p-menu":menu}).

for my years of experience, this was a silly mistake.

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

30 Nov 2021, 15:57

I did same mistake. Now, I have corrected previous post. Thanks for the feedback.

Best Regards,

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests