add attribute list-limit="n" (replace n with a number) to tbody. For HTML5 compliance, attribute can be replaced with data- prefix, ie: data-list-limit="9". See example
<tr ng-repeat="policy in groupedItems[currentPage]" ng-class-odd="'odd'" ng-class-even="'even'">
It iterates each of the item in groupedItems, and return item to object policy. If it's an odd row (ng-class-odd), add class odd to the element (<tr>). Same for even row.
<th><a href="" ng-click="sortBy('id')" ng-class="selectedColumn('id')">id</a> </th> <th><a href ng-click="sortBy('writingAgentName')" ng-class="selectedColumn('writingAgentName')">Writing Agent Name</a> </th>
Each time the column header is clicked (ng-click), it calls the sortBy() method with the name of the column it wants to sort (predicate). It sorts the column with the current data context whatever is currently displaying. If it's displaying a subset of data with agent's first name is John, then any sorting with by sorted within that data subset.
When column id is being sorted, this method selectedColumn will return a string 'asc' or 'dsc' when it's an ascending sort or descending sort, it will also be the class that is added to element as well.
You can pick one of these options:
Then navigate your browser to
http://localhost:<port>/app/index.html to see the app running in
This really depends on how complex is your app and the overall infrastructure of your system, but
the general rule is that all you need in production are all the files under the
Everything else should be omitted.
Angular apps are really just a bunch of static html, css and js files that just need to be hosted somewhere, where they can be accessed by browsers.
If your Angular app is talking to the backend server via xhr or other means, you need to figure out what is the best way to host the static files to comply with the same origin policy if applicable. Usually this is done by hosting the files by the backend server or through reverse-proxying the backend server(s) and a webserver(s).
Requires node.js, Testacular (
sudo npm install -g testacular) and a local
or remote browser.
Angular ships with a baked-in end-to-end test runner that understands angular, your app and allows you to write your tests with jasmine-like BDD syntax.
Requires a webserver, node.js +
./scripts/web-server.js or your backend server that hosts the angular static files.
Check out the end-to-end runner's documentation for more info.
http://localhost:port/test/e2e/runner.htmlin your browser
CloudBees have provided a CI/deployment setup:
If you run this, you will get a cloned version of this repo to start working on in a private git repo, along with a CI service (in Jenkins) hosted that will run unit and end to end tests in both Firefox and Chrome.
When we upgrade angular-seed's repo with newer angular or testing library code, you can just fetch the changes and merge them into your project with git.
Module stats last updated: 2015-06-07 05:42:51