47
47
< span class ="icon-bar "> </ span >
48
48
< span class ="icon-bar "> </ span >
49
49
</ button >
50
- < a class ="brand " href ="# "> Angular Timer Directive </ a >
50
+ < a class ="brand " href ="# "> Angular Timer</ a >
51
51
< div class ="nav-collapse collapse ">
52
52
< ul class ="nav ">
53
- < li class ="active "> < a href ="# "> Home</ a > </ li >
53
+ < li class ="active "> < a href ="#introduction "> Home</ a > </ li >
54
+ < li class ="dropdown ">
55
+ < a href ="# " class ="dropdown-toggle " data-toggle ="dropdown "> Examples < b class ="caret "> </ b > </ a >
56
+ < ul class ="dropdown-menu ">
57
+ < li > < a href ="#basic-example "> Basic Example</ a > </ li >
58
+ < li > < a href ="#timer-with-interval "> Timer with interval</ a > </ li >
59
+ < li > < a href ="#formatted-timer "> Formatted Timer</ a > </ li >
60
+ </ ul >
61
+ </ li >
54
62
< li class ="dropdown ">
55
63
< a href ="# " class ="dropdown-toggle " data-toggle ="dropdown "> Usage < b class ="caret "> </ b > </ a >
56
64
< ul class ="dropdown-menu ">
57
- < li > < a href ="# "> From AngularJS</ a > </ li >
65
+ < li > < a href ="#angularjs-example "> From AngularJS</ a > </ li >
58
66
< li > < a href ="# "> From native JavaScript</ a > </ li >
59
67
< li > < a href ="# "> From jQuery</ a > </ li >
60
68
</ ul >
66
74
</ div >
67
75
68
76
< div class ="container ">
69
- < div class ="row ">
70
- < div class ="span12 ">
71
- < h2 > Introduction</ h2 >
72
- < p > AngularJS directive is a powerful way of building reusable components.
73
- This simple project will serve as a sample/reference implementation demonstrating the power & flexibilities of
74
- AngularJS directives by making it truly usable across runtime libraries (AngularJS, plain old JavaScript, jQuery etc.)</ p >
75
- < p >
76
- < h3 > Basic Example</ h3 >
77
- < div class ="bs-docs-example ">
78
- < p > This simple directive < code > <timer id="timer1"/></ code > markup code will start the timer with the default configuration option</ p >
79
- < div > < timer id ="timer1 "/> </ div >
80
- < button type ="button " class ="btn " onclick ="startTimer('timer1', this) "> Start</ button >
81
- < button type ="button " class ="btn " onclick ="stopTimer('timer1', this) "> Stop</ button >
82
- </ div >
83
- </ div >
84
- </ p >
85
- </ div >
86
- < div class ="row ">
87
- < div class ="span12 ">
88
- < p >
89
- < h3 > Timer with interval example</ h3 >
90
- < div class ="bs-docs-example ">
91
- < p > This directive < code > <timer interval="1000" id="timer2"/></ code > markup code will run the timer tick every second</ p >
92
- < div > < timer interval ="1000 " id ="timer2 "/> </ div >
93
- < button type ="button " class ="btn " onclick ="startTimer('timer1', this) "> Start</ button >
94
- < button type ="button " class ="btn " onclick ="stopTimer('timer1', this) "> Stop</ button >
95
- </ div >
96
- </ div >
97
- </ p >
98
- </ div >
99
-
100
- < div class ="row ">
101
- < div class ="span12 ">
102
- < p >
103
- < h3 > Formatted timer</ h3 >
104
- < div class ="bs-docs-example ">
105
- < p > This directive < code > <timer interval="1000" id="timer3"/></ code > markup code will run the timer tick every second</ p >
106
- < div > < timer id ="timer3 "/> {{minutes}} minutes, {{seconds}} seconds.</ div >
107
- < button type ="button " class ="btn " onclick ="startTimer('timer3', this) "> Start</ button >
108
- < button type ="button " class ="btn " onclick ="stopTimer('timer3', this) "> Stop</ button >
109
- </ div >
110
- </ div >
111
- </ p >
112
- </ div >
77
+ < section id ="introduction ">
78
+ < h1 > Introduction</ h1 >
79
+ < p > Directives in < a target ="_new " href ="http://angularjs.org "> AngularJS</ a > is a powerful way of building reusable < em > UI components</ em > .
80
+ This simple project will serve as a sample/reference implementation demonstrating its
81
+ flexibilities by making it usable across runtime (AngularJS, plain simple JavaScript & jQuery)</ p >
82
+
83
+ </ section >
84
+ < section id ="basic-example ">
85
+ < h3 > Basic Example</ h3 >
86
+ < div class ="bs-docs-example ">
87
+ < p > This simple directive < code > <timer /></ code > markup code will start the timer with the default option of ticking every 1 millisecond</ p >
88
+ < div > < timer id ="timer1 "/> </ div >
89
+ < button type ="button " class ="btn " onclick ="startTimer('timer1', this) "> Start</ button >
90
+ < button type ="button " class ="btn " onclick ="stopTimer('timer1', this) "> Stop</ button >
91
+ </ div >
92
+ </ section >
93
+
94
+ < section id ="timer-with-interval ">
95
+ < h3 > Timer with interval example</ h3 >
96
+ < div class ="bs-docs-example ">
97
+ < p > This directive < code > <timer interval="1000" id="timer2"/></ code > markup code will run the timer tick every second</ p >
98
+ < div > < timer interval ="1000 " id ="timer2 "/> </ div >
99
+ < button type ="button " class ="btn " onclick ="startTimer('timer1', this) "> Start</ button >
100
+ < button type ="button " class ="btn " onclick ="stopTimer('timer1', this) "> Stop</ button >
101
+ </ div >
102
+ </ section >
103
+
104
+ < section id ="formatted-timer ">
105
+ < h3 > Formatted timer</ h3 >
106
+ < div class ="bs-docs-example ">
107
+ < p > This directive < code > <timer interval="1000" id="timer3"/></ code > markup code will run the timer tick every second</ p >
108
+ < div > < timer id ="timer3 "/> {{minutes}} minutes, {{seconds}} seconds.</ div >
109
+ < button type ="button " class ="btn " onclick ="startTimer('timer3', this) "> Start</ button >
110
+ < button type ="button " class ="btn " onclick ="stopTimer('timer3', this) "> Stop</ button >
111
+ </ div >
112
+ </ section >
113
113
114
114
< hr >
115
+ < h2 > Examples</ h2 >
116
+ < section id ="angularjs-example ">
117
+ < h3 > Using timer directive from Angular</ h3 >
118
+ < ul class ="nav nav-tabs " id ="myTab ">
119
+ < li class ="active "> < a data-toggle ="tab " href ="#angularjs-example-source "> index.html</ a > </ li >
120
+ < li > < a data-toggle ="tab " href ="#angularjs-example-demo "> Demo</ a > </ li >
121
+ </ ul >
122
+
123
+ < div class ="tab-content ">
124
+ < div class ="tab-pane active " id ="angularjs-example-source ">
125
+ < pre class ="prettyprint linenums ">
126
+ < code >
127
+ <a data-toggle="modal" href="remote.html" data-target="#modal">click me</a>
128
+ </ code >
129
+ </ pre >
130
+ </ div >
131
+ < div class ="tab-pane " id ="angularjs-example-demo ">
132
+ < h1 > Demo</ h1 >
133
+ </ div >
134
+ </ div >
135
+ </ section >
136
+
115
137
116
138
< footer >
117
139
< p > © Siddique Hameed 2013</ p >
@@ -122,5 +144,6 @@ <h3>Formatted timer</h3>
122
144
< script src ="docs/prettify.js "> </ script >
123
145
< script src ="docs/application.js "> </ script >
124
146
147
+
125
148
</ body >
126
149
</ html >
0 commit comments