Friday, 27 January 2017

Create responsive AngularJS Dynamic Tabs using BootStrap

The AngularJS directive here I create for my tab control is ngTab. Which accepts two parameters length & data. Length is the number of tabs we required. When data is the states & it’s cities. Data is in JSON format. You can replace this data as per your requirements. To get these parameters values in AngularJS ngTab directive I am using scope: { “length”: ‘=’, “data”: ‘@’ }.

You can watch this in the below app.js file. To create responsive Tabs I used BootStrap here. my-tab.html is my template for ngTab. In template file I am binding the state & cities values (In form of array) from the scope object of TabModule...

No comments:

Post a Comment