TabView content dynamic load

UI Components for Angular
Post Reply
sleeper9
Posts: 14
Joined: 29 Mar 2016, 16:37

11 Apr 2016, 08:46

Hello, I have a TabView with several tabs defined. I would like to know if there is any example or tutorial how to load TabView's tab content dynamically, e.g. by AJAX when clickin on a tab header. It would be good if I could "link" for a tab in particular,

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

13 Apr 2016, 10:10

Do you mean linking content of the tab with a url? Right now no, but it is being planned. I believe you can now implement this with ComponentLoader api of Angular2 though as a quick solution.

sleeper9
Posts: 14
Joined: 29 Mar 2016, 16:37

13 Apr 2016, 12:50

I mean something like JQueryUI did in Tabs component: https://jqueryui.com/tabs/#ajax
In the meatime, I will take a look at ComponentLoader, I just familiarize myself with Angular2 :) ...

And yes, It would also be good if I could copy-paste a URL like app/giraffes/12#body, where the body is an nth tab header (or something) in a TabView on that page.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

13 Apr 2016, 18:25

We've actually done this before for PrimeUI and PrimeFaces;

http://www.primefaces.org/primeui/#tabview
http://www.primefaces.org/showcase/ui/p ... View.xhtml

aka on-demand loading.

Please create a ticket about this at our tracker and we'll work on it.

https://github.com/primefaces/primeng/issues

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests