|
| 1 | +<div id="" style="overflow:scroll; height:400px;"> |
| 2 | +<!-- your widget template --> |
| 3 | + <h4>Data</h4> |
| 4 | + <p class="mydata"> |
| 5 | + <b>record:</b>{{data.record}}</p> |
| 6 | + <p class="mydata"> |
| 7 | + <b>record1:</b>{{data.record1}}</p><br> |
| 8 | + |
| 9 | + <h4>NG-CLICK</h4> |
| 10 | + <p>Run Function on Click</p> |
| 11 | + <button ng-click="myButton()">Click me!!!</button> |
| 12 | + |
| 13 | + <h4>NG-MODEL</h4> |
| 14 | + <p>2-Way data variable</p> |
| 15 | + <b>myText:</b> {{myText}}<br> |
| 16 | + <input type="text" ng-model="myText"><br> |
| 17 | + |
| 18 | + <h4>NG-KEYUP</h4> |
| 19 | + <p>Use Enter to Run Function</p> |
| 20 | + <input type="text" placeholder="Press Enter key here" ng-keyup="$event.keyCode == 13 ? myKey() : null"/><br><br> |
| 21 | + |
| 22 | + <h4>NG-REPEAT</h4> |
| 23 | + <p>Looping through data</p> |
| 24 | + <p ng-repeat="x in data.record">{{x}} - Index {{$index}}</p><br> |
| 25 | + |
| 26 | + <h4>NG-IF</h4> |
| 27 | + <p>Show only where condition in passed<br> |
| 28 | + Other Variables are not available</p> |
| 29 | + <p ng-repeat="x in data.record" ng-if="x == 3">{{x}}</p> |
| 30 | + |
| 31 | + |
| 32 | + <h4>NG-SHOW</h4> |
| 33 | + <p>Show only where condition in passed<br> |
| 34 | + Other Variables are available but hidden</p> |
| 35 | + <p ng-repeat="x in data.record" ng-show="x == 3">{{x}}</p> |
| 36 | + |
| 37 | + |
| 38 | + <h4>NG-HIDE</h4> |
| 39 | + <p>Hide where condition in passed<br> |
| 40 | + Variable is available but hidden</p> |
| 41 | + <p ng-repeat="x in data.record" ng-hide="x == 3">{{x}}</p> |
| 42 | + |
| 43 | + |
| 44 | + <h4>NG-BIND</h4> |
| 45 | + TEXT-BINDING |
| 46 | + <p ng-bind="mytext"></p><br> |
| 47 | + |
| 48 | + <h4>NG-BIND-HTML</h4> |
| 49 | + <p>BIND with HTML Formatting</p> |
| 50 | + <p ng-bind-html="htmlText"></p> |
| 51 | + |
| 52 | + |
| 53 | + <h4>$INDEX</h4> |
| 54 | + <p ng-repeat="x in data.record">{{x}} - Index {{$index}}</p> |
| 55 | + |
| 56 | + <h4>$INDEX IN IF CONDITION</h4> |
| 57 | + <p ng-repeat="x in data.record" ng-if="$index == 3">{{x}} - Index {{$index}}</p> |
| 58 | + |
| 59 | + <h4>$EVEN</h4> |
| 60 | + <p ng-repeat="x in data.record" ng-if="$even">{{x}} - Index {{$index}}</p> |
| 61 | + |
| 62 | + <h4>$ODD</h4> |
| 63 | + <p ng-repeat="x in data.record" ng-if="$odd">{{x}} - Index {{$index}}</p> |
| 64 | + |
| 65 | + <h4>$FIRST</h4> |
| 66 | + <p ng-repeat="x in data.record" ng-if="$first">{{x}} - Index {{$index}}</p> |
| 67 | + |
| 68 | + <h4>$LAST</h4> |
| 69 | + <p ng-repeat="x in data.record" ng-if="$last">{{x}} - Index {{$index}}</p> |
| 70 | + |
| 71 | + <h4>$MIDDLE</h4> |
| 72 | + Leave 1st and Last |
| 73 | + <p ng-repeat="x in data.record" ng-if="$middle">{{x}} - Index {{$index}}</p> |
| 74 | + |
| 75 | + <h4>LIMIT TO</h4> |
| 76 | + <p ng-repeat="x in data.record | limitTo:3">{{x}} - Index {{$index}}</p> |
| 77 | + |
| 78 | + <h4>LIMIT TO BEGIN</h4> |
| 79 | + Start Index:<input type="number" ng-model="startIndex"> <br> |
| 80 | + <p ng-repeat="x in data.record | limitTo:3:startIndex">{{x}} - Index {{$index}}</p> |
| 81 | + |
| 82 | + <h4>UPPERCASE</h4> |
| 83 | + {{data.record1}}<br> |
| 84 | + <p ng-repeat="x in data.record1">{{x | uppercase}} - Index {{$index}}</p> |
| 85 | + |
| 86 | + <h4>lowercase</h4> |
| 87 | + <p ng-repeat="x in data.record1">{{x | lowercase}} - Index {{$index}}</p> |
| 88 | + |
| 89 | + <h4>ORDER BY</h4> |
| 90 | + <p ng-repeat="x in data.record1 | orderBy:x">{{x}} - Index {{$index}}</p> |
| 91 | + |
| 92 | + <h4>ORDER BY DESCENDING</h4> |
| 93 | + <p ng-repeat="x in data.record1 | orderBy:x:true">{{x}} - Index {{$index}}</p> |
| 94 | + |
| 95 | + |
| 96 | + <h4>FILTER</h4> |
| 97 | + Filter:<input type="text" placeholder="Enter filter here" ng-model="myFilter"> |
| 98 | + <p ng-repeat="x in data.record1 | filter:myFilter">{{x}} - Index {{$index}}</p> |
| 99 | + |
| 100 | + |
| 101 | +</div> |
0 commit comments