This is a migrated thread and some comments may be shown as answers.

How to enable/disable tabstrip tab in angular

4 Answers 222 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Mongonv
Top achievements
Rank 2
Mongonv asked on 06 Jul 2015, 09:41 PM

Hey all,

I know this is probably super simple, but I have not been able to find how to enable/disable tabs from within the angular controller (not jquery) for a tabstrip in angular.

 Can someone point me to a sample on how to do this?

 Thanks

4 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 08 Jul 2015, 07:03 AM

Hello,

 

the tabstrip does not expose any bindable properties to enable/disable tabs with angular. This being said, you can export the widget object to the controller scope and use its methods from there.

 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mongonv
Top achievements
Rank 2
answered on 08 Jul 2015, 04:02 PM

Thanks for that, that makes sense on getting the object.

 I am still trying to figure out how to identify the specific tab though.  If I have 7 tabs and the user is on tab 5, how do I know that tab's ID?  

 All I have been able to figure out so far is getting the tab's value() which seems to be the displayed text, but that can be problematic to use when it may be a dynamically generated value for showing on the tab.

In other libs we have used, the tabs had an index value and it seems that there is something like that from the example I have been looking thru, that is when iterating thru the children of the tabstrip, not for referencing the specific tab by some ID type of value.

Any info on this would be really appreciated.

Thanks

0
Plamen Lazarov
Telerik team
answered on 10 Jul 2015, 02:26 PM

Hello,

In order to get the ID of the selected item you could use the select event of the widget. For your convenience I prepared a simple demo - please check and let me know if it helps. 

http://dojo.telerik.com/OhIgI/4

 

Regards,
Plamen Lazarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mongonv
Top achievements
Rank 2
answered on 10 Jul 2015, 03:04 PM

Hey Plamen,

Thanks for the example, its always the simple stuff that consumes all the time in getting going in a new platform.

Great example, shows how your platform expects the ID to be managed.

Have a great weekend

Tags
TabStrip
Asked by
Mongonv
Top achievements
Rank 2
Answers by
Petyo
Telerik team
Mongonv
Top achievements
Rank 2
Plamen Lazarov
Telerik team
Share this question
or