Mastering Web Application
Displaying and Formatting Data The ng-class directive can also accept arguments of type string or array. Both arguments can cont ...
Chapter 4 Mentioned DOM event handlers can accept a special argument $event in their expression, which represents the raw DOM ev ...
Displaying and Formatting Data <span ng-switch-when="false"> There are no items in the list. </span> </div> Of ...
Chapter 4 <li>{{item.description}}</li> <!-- and end it here --> </ul> A new version of AngularJS (1.2.x ...
Displaying and Formatting Data Where the included fragment specifies input's type as static string. Pay attention to scoping iss ...
Chapter 4 Several filters can be combined (chained) to form a transformation pipeline. As an example we can format a string by l ...
Displaying and Formatting Data The listed filters work on arrays only (limitTo being an exception, it can cope with strings as w ...
Chapter 4 If we assume that our data model has the following properties: name, desc, priority, estimation and done, we could wri ...
Displaying and Formatting Data Additionally AngularJS provides a catch-all property name: $. Using this wildcard as a property n ...
Chapter 4 To remedy this situation we can create an intermediate variable (filteredBacklog) that would hold a filtered array: ng ...
Displaying and Formatting Data The orderBy filter is easy and intuitive to use so we can immediately dive into the code example, ...
Chapter 4 Our sorting example builds on top of the previous, filtering one, so now our backlog list can be both filtered and sor ...
Displaying and Formatting Data To get the idea of an interface for the new filter; let's call it pagination we will write a sket ...
Chapter 4 var input = [1, 2, 3, 4, 5, 6]; expect(paginationFilter(input, 0, 2)).toEqual([1, 2]); expect(paginationFilter(input, ...
Displaying and Formatting Data return limitToFilter(input, limit-3) + '...'; } return input; }; }); The $filter('limitTo')functi ...
Chapter 4 Filters and DOM manipulation At times it might be tempting to return HTML markup as a result of filter's execution. In ...
Displaying and Formatting Data Costly data transformations in filters Filters, when used in a template, become integral part of ...
Chapter 4 Given an array of different items stored in the items variable on a scope, the random filter could be used in a templa ...
Displaying and Formatting Data Summary This chapter walked us through a set of patterns used to display data contained in the mo ...
Creating Advanced Forms AngularJS builds upon standard HTML forms and input elements. This means that you can continue to create ...
«
3
4
5
6
7
8
9
10
11
12
»
Free download pdf