Beginning AngularJS
CHApTer 6 ■ WorkIng WITH ForMS This time, the value of firstName is “Jimmy.” As AngularJS is working in real time, once the text ...
CHApTer 6 ■ WorkIng WITH ForMS AngularJS Forms With a discussion of standard forms and model binding behind us, we are in good s ...
CHApTer 6 ■ WorkIng WITH ForMS <select name="channels" ng-model="person.channels" Where did you hear about us? <input ...
CHApTer 6 ■ WorkIng WITH ForMS This is not an AngularJS feature; it is part of the HTML5 specification. Compliant browsers will ...
CHApTer 6 ■ WorkIng WITH ForMS It isn’t a particularly intuitive syntax, but we can make out the key components. In plain Englis ...
CHApTer 6 ■ WorkIng WITH ForMS This approach is not quite as easy as adding the checked attribute to the HTML code, but it’s not ...
CHApTer 6 ■ WorkIng WITH ForMS <select name="level" ng-model="person.levels" ng-options="obj.label as obj.value for obj in pe ...
CHApTer 6 ■ WorkIng WITH ForMS Before we look at validation as it applies to specific fields, let’s look at what AngularJS does ...
CHApTer 6 ■ WorkIng WITH ForMS As we have given our form a name and we have added the novalidation attribute, it is now primed f ...
CHApTer 6 ■ WorkIng WITH ForMS Both of the conditional statements in the register() method work the same way; they each check to ...
CHApTer 6 ■ WorkIng WITH ForMS Thanks to a small amount of CSS, this looks a lot tidier. Most of the CSS, which is shown in List ...
CHApTer 6 ■ WorkIng WITH ForMS input[name='email'].ng-dirty.ng-valid { color: green; } It isn’t readily apparent what these last ...
CHApTer 6 ■ WorkIng WITH ForMS This revision means that our input[name='email'].ng-dirty.ng-valid rule kicks in. Consequently, t ...
CHApTer 6 ■ WorkIng WITH ForMS Here is the associated controller code: Listing 6-20. Regsitration Form—the JavaScript Code angul ...
CHApTer 6 ■ WorkIng WITH ForMS Summary In this chapter, I offered a brief introduction to HTML forms, and then we looked at how ...
Chapter 7 Services and Server Communication In the last chapter, we looked at HTML forms as a means of presenting a user interfa ...
Chapter 7 ■ ServiCeS and Server CommuniCation Using Services As I mentioned before, Angular ships with a set of useful built-in ...
Chapter 7 ■ ServiCeS and Server CommuniCation ■ Note Like other core angular identifiers, built-in services always start with th ...
Chapter 7 ■ ServiCeS and Server CommuniCation The URL is: {{url}} {{protocol}} {{host}} {{port}} As we did with the $window ...
Chapter 7 ■ ServiCeS and Server CommuniCation Why Use Services? One thing that might have struck you as you read through these e ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf