Simple Angular Tabs Controls Directive

Simple Angular Tabs Controls Directive

Today, We want to share with you Simple Angular Tabs Controls Directive.
In this post we will show you Simple Tab Controls in AngularJS Example, hear for Build a Tabs Directive in AngularJS we will give you demo and example for implement.
In this post, we will learn about Simple Tab Controls in AngularJS with an example.

The Tab control is a only one place to show separate tab and different types of information view.
and allows user to display just only one tab at a time.
It tabs allows the user(click) to select from a number of different(seprate) views by clicking on the tab headers and select content show just view only this page content ata a time.
Many other include css to different type Fade Effect and display tab.

READ :  AngularJS Contact Form Send Email with Attachment using PHP

First Include angularjs script library

 
<a href="http://yourprojectname/angularjs/1.3.15/angular.min.js">http://yourprojectname/angularjs/1.3.15/angular.min.js</a>

Include AngularJS Module and controller


Include AngularJS Body Part

<ul class="nav nav-tabs">
	  <!--- page Menu list -->
		<li><a href="">Home</a></li>
		<li><a href="">Profile</a></li>
		<li><a href="">About us</a></li>
		<li><a href="">Contact us</a></li>
		<li><a href="">site map</a></li>
		<li><a href="">faq</a></li>
		<li><a href="">Feedback</a></li>
	  </ul>
	  <!-- start Div Content-->
 <div class="tab-content">
		<div>Home page Panel 1 Content</div>
		<div>Profile page Panel 2 Content</div>
		<div>About us page Panel 3 Content</div>
		<div>Contact us page Panel 4 Content</div>
		<div>site map page Panel 5 Content</div>
		<div>faq page Panel 6 Content</div>
		<div>Feedback page Panel 7 Content</div>
</div>

Include AngularJS JavaScript

angular.module("kingapp", [])
			.controller("angularkingctrl", ['$scope', function($scope) {
				$scope.page_activeTab_in = 1;
				
				$scope.setpage_activeTab_in = function(select_tabname) {
					$scope.page_activeTab_in = select_tabname;
				}
			}]);

angularjs tabs control Full php example

			


  
    <title>Angular tab Example</title>
	 
  
  
  	  <ul class="nav nav-tabs">
	  <!--- page Menu list -->
		<li><a href="">Home</a></li>
		<li><a href="">Profile</a></li>
		<li><a href="">About us</a></li>
		<li><a href="">Contact us</a></li>
		<li><a href="">site map</a></li>
		<li><a href="">faq</a></li>
		<li><a href="">Feedback</a></li>
	  </ul>
	  <!-- start Div Content-->
	  <div class="tab-content">
		<div>Home page Panel 1 Content</div>
		<div>Profile page Panel 2 Content</div>
		<div>About us page Panel 3 Content</div>
		<div>Contact us page Panel 4 Content</div>
		<div>site map page Panel 5 Content</div>
		<div>faq page Panel 6 Content</div>
		<div>Feedback page Panel 7 Content</div>
	  </div>
	  <!-- End Div Content-->
	  <a href="http://yourprojectname/angularjs/1.3.15/angular.min.js">http://yourprojectname/angularjs/1.3.15/angular.min.js</a>
	  
	  	angular.module("kingapp", [])
			.controller("angularkingctrl", ['$scope', function($scope) {
				$scope.page_activeTab_in = 1;
				
				$scope.setpage_activeTab_in = function(select_tabname) {
					$scope.page_activeTab_in = select_tabname;
				}
			}]);
	  
  

Add a Comment

Your email address will not be published. Required fields are marked *