-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completed first version of Debounce documentation #39
- Loading branch information
Showing
4 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,35 @@ | ||
<%= include ../title-inside.html %> | ||
<div class="page-header"> | ||
<h2>Debounce <small>(ngTasty.service.debounce)</small></h2> | ||
<p></p> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-md-12 docs-head"> | ||
<p>An Angular Service for limits the rate at which a function can fire</p> | ||
</div> | ||
<div class="col-xs-12"> | ||
<button class="btn btn-info btn-lg" ng-click="plusOne()">Plus One</button> | ||
<h2 ng-bind="number"></h2> | ||
</div> | ||
<div class="col-xs-12"> | ||
<tabset class="code"> | ||
<tab heading="Markup"> | ||
<div> | ||
<pre ng-non-bindable><code data-language="html"><button class="btn btn-info btn-lg" ng-click="plusOne()">Plus One</button> | ||
<h2 ng-bind="number"></h2></code></pre> | ||
</div> | ||
</tab> | ||
<tab heading="JavaScript"> | ||
<div> | ||
<pre ng-non-bindable><code data-language="javascript">.controller('MyCtrl', function($scope, debounce) { | ||
$scope.number = 1; | ||
$scope.plusOne = debounce(function () { | ||
$scope.number += 1; | ||
}, 1000); | ||
})</code></pre> | ||
</div> | ||
</tab> | ||
</tabset> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters