Angular Directives

Building a declarative API Explorer

@labfoo | github.com/adambutler

What is a directive?

@labfoo | github.com/adambutler

<foo></foo>

<img src="placehold.it/800x600" lightbox/>

<submit ng-disabled="!isValid()">

Templates

@labfoo | github.com/adambutler

$scope

initalizer / helpers etc.

provider

DIRECTIVES ARE

AWESOME

<div role="tabpanel">
  <ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active">
      <a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a>
    </li>
    <li role="presentation">
      <a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a>
    </li>
    <li role="presentation">
      <a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a>
    </li>
    <li role="presentation">
      <a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a>
    </li>
  </ul>
  <div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="home">...</div>
    <div role="tabpanel" class="tab-pane" id="profile">...</div>
    <div role="tabpanel" class="tab-pane" id="messages">...</div>
    <div role="tabpanel" class="tab-pane" id="settings">...</div>
  </div>
</div>



<tabset>
  <tab title="Home">...</tab>
  <tab title="Profile">...</tab>
  <tab title="Messages">...</tab>
  <tab title="Settings">...</tab>
</tabset>





<api-explorer></api-explorer>

Copy of Angular Directives

By Adam Butler

Copy of Angular Directives

  • 1,662