Giter VIP home page Giter VIP logo

angular-tabs's Introduction

angular-tab Build Status


Here is the Demo

Getting Started

Download the production version or the development version.

Usage

  1. Add the js to your HTML code.
<script src="dist/angular-tab.tpl.min.js"></script>
  1. Add dependency to your app modules
var myApp = angular.module('myApp', ['quark.tab']);
  1. Put directive quark-tab-set & quark-tab into your HTML code
<div quark-tab-set tab-skip-reload="true">
	<div quark-tab tab-href="/urltab/tab1" template-url="views/url-tab/tab1.html">TAB1</div>
    <div quark-tab tab-href="/urltab/tab2" template-url="views/url-tab/tab2.html">TAB2</div>
    <div quark-tab tab-href="/urltab/tab3" template-url="views/url-tab/tab3.html">TAB3</div>
	<div quark-tab tab-href="/urltab/tab4" template-url="views/url-tab/tab4.html">TAB4</div>
</div>

Attributes

quark-tab-set

  • tab-skip-reload (default false)

    The route change will not reload controller completely.

  • tab-init-active (default 0)

    The index tab will set to active when initialize.

  • tab-location-type (default path)

    Defines tab location type, There are 4 types path,url,hash,search .

    If choose search , you should set a search name like tab-location-type="search:tab" the default search name is tab

    Examples

    path : url/#article/2/tab1

    url : url/#article/2/tab1

    hash : url/#article/2#tab1

    search : url/#article/2?tab=tab1

quark-tab

  • template-url (default null)

    This url will be include in tab-body when this tab active.

  • tab-href (default null)

    Define this tab location flag . if choose location-type is path or url , you should write complete url .

  • tab-match (default same to tab-href)

    Defines if the url location match this attribute value , tab will be active

Examples

<div quark-tab-set tab-location-type="search:tab" tab-init-active="1">
        <div quark-tab tab-href="tab1" template-url="views/url-tab/tab1.html">TAB1</div>
        <div quark-tab tab-href="tab2" template-url="views/url-tab/tab2.html">TAB2</div>
    </div>

generated by angular-component

angular-tabs's People

Contributors

ariesjia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.