Skip to content

Commit

Permalink
Wrote docs filterInt #38
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia committed Dec 10, 2014
1 parent e80eea3 commit ba5b4b8
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ app.get('/table-server-side/index.html', function(req, res){
res.render('template/table-server-side/index.html', { base: base, ngTasty: ngTasty });
});

app.get('/filter/filter-int', function(req, res){
title = '#ngTasty - AngularJS filter Integer';
res.render('template/index.html', { base: base, ngTasty: ngTasty, title:title });
});
app.get('/filter/filter-int.html', function(req, res){
res.render('template/filter/filter-int.html', { base: base, ngTasty: ngTasty });
});

app.get('/filter/range', function(req, res){
title = '#ngTasty - AngularJS range filter';
res.render('template/index.html', { base: base, ngTasty: ngTasty, title:title });
Expand Down
9 changes: 9 additions & 0 deletions docs/static/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ angular.module('myApp', [
templateUrl: 'table-server-side/index.html',
title: '#ngTasty - AngularJS server side table directive'
})
.when('/filter/filter-int', {
controller: 'FilterCtrl',
templateUrl: 'filter/filter-int.html',
title: '#ngTasty - AngularJS filter Integer'
})
.when('/filter/range', {
controller: 'FilterCtrl',
templateUrl: 'filter/range.html',
Expand Down Expand Up @@ -341,6 +346,10 @@ angular.module('myApp.controllers', [])

$rootScope.page = 'range';

$scope.age = 27;
$scope.text = 'Ciao';
$scope.ageBytext = '22';

$scope.start = 1;
$scope.stop = 10;
$scope.step = 2;
Expand Down
2 changes: 1 addition & 1 deletion docs/template/filter/clean-field-name.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="page-header">
<h2>Clean Field Name <small>(ngTasty.service.cleanFieldName)</small></h2>
<h2>Clean Field Name <small>(ngTasty.filter.cleanFieldName)</small></h2>
<p></p>
</div>
35 changes: 35 additions & 0 deletions docs/template/filter/filter-int.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<%= include ../title-inside.html %>
<div class="page-header">
<h2>Filter Int<small>
(<a target="_blank"
href="https://github.com/Zizzamia/ng-tasty/blob/master/src/filter/filter-int.js#L42">ngTasty.filter.filterInt</a>)
</small></h2>
</div>
<div class="row">
<div class="col-xs-6">
<p><b ng-bind="age | filterInt"></b></p>
<p><b ng-bind="text | filterInt"></b></p>
<p><b ng-bind="ageBytext | filterInt"></b></p>
</div>
<div class="col-xs-6">
<p>An Integer filter.</p>
</div>
<div class="col-xs-12">
<tabset class="code">
<tab heading="Markup">
<div>
<pre ng-non-bindable><code data-language="html"><p><b ng-bind="age | filterInt"></b></p>
<p><b ng-bind="text | filterInt"></b></p>
<p><b ng-bind="ageBytext | filterInt"></b></p></code></pre>
</div>
</tab>
<tab heading="Javascript">
<div>
<pre ng-non-bindable><code data-language="javascript">$scope.age = 27;
$scope.text = 'Ciao';
$scope.ageBytext = '22';</code></pre>
</div>
</tab>
</tabset>
</div>
</div>
3 changes: 3 additions & 0 deletions docs/template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ <h4>Filter</h4>
<!--
<li><a href="<%= base %>/#CleanFieldName">Clean Field Name</a></li>
-->
<li>
<a href="<%= base %>/filter/filter-int" ng-class="{active:page == 'filter-int'}">Filter Int</a>
</li>
<li>
<a href="<%= base %>/filter/range" ng-class="{active:page == 'range'}">Range</a>
</li>
Expand Down

0 comments on commit ba5b4b8

Please sign in to comment.