Today we will cover the last two steps on the progression. We added some basic validation (Part1), then we created a validation on a single form control (Part1), we raised the bet creating a custom validation over a complex object (Part2). We took some distance and refactored our code to make it a reusable component (Part3). And now we will make sure we handle multiple instances and its multiple errors in a semantic efficient fashion that provides the user a much better experience.
In this delivery, we are going to refactor our birth date validation and html into a semantic reusable component. If you would like to revisit out of the box validations, creating a custom validation over a single input, read Part 1 and if you would like to revisit creating validations over complex objects go over Part 2.
I ll take you through a 6 steps progression on custom validations. We ll go from out of the box Angular provided validations to reusable directives components. In this article, we’ll cover out of the box validations and unit testing/creating our first custom validation as a directive.
Going back to our last post related to best practices and roles in AngularJS, let's talk a little bit more about this showing a really small example.
Lets talk about best practices and roles in AngularJS. A controller is the middle man. Its main role is to talk to the Service to get the model and then make sure this model is available to our presentation layer(html). Even in large applications, the controller should be small, compact and dumb!
Today the Angular Conference NG-CONF starts. We are going to be part of it. Follow us on twitter @ng_learn to get more news. Before we departed we wanted to give you some homework. This is the sixth part of our AngularJS + CoffeeScript + TDD Workshop.
This is the fifth part of our AngularJS + CoffeeScript + TDD Workshop. On other news, we are one week away from the first Angular Conference NG-CONF. Ng-Learn will be present and posting what we learn. Stay tuned!!
In the following example, we set the values for our checkbox using ng-checked. The default values are set using ng-init; the same result is accomplished by initializing the value in the controller. When the user marks the checkbox as checked, we use the ng-click to change the value from true to false, or vice versa.
Merry Xmas!! This is the fourth part of our AngularJS + CoffeeScript + TDD Workshop. Have you been a good developer this year?
Welcome again little grasshopper. This is the third part of our AngularJS + CoffeeScript + TDD Workshop. Are you ready to kill Bill?
Welcome again my young padawan. This is the second part of our AngularJS + CoffeeScript + TDD Workshop. Was the first part too easy? Lets see how you do this time. Are you ready Shinobi?
Welcome my young padawan. This is the first part of our AngularJS + CoffeeScript + TDD Workshop. Are you ready Shinobi?
In the following example, we set a default option for our users to see. We could leave it blank but it would not help our user. We could also preselect one of our options as the default one but sometimes we do not want to influence or dictate our user’s selection.
One of the features that makes AngularJS standout is the ability to bind the model with the views without having to write controller code to connect things together. More over it keeps them in sync, so for example, if the view either the view or the model are updated it refreshes the other automatically
Lets say we want to model the object we retrieved from our backend. We want to modify some data, concatenate other and we want to add some functions so we can call them on the fly at presentation layer. Lets assume our e-commerce site’s backend just retrieved a saved shopping cart (a la amazon). It contains a saved shopping cart holding product with a title, description, quantity, price, taxes, fees, etc.
This is a Zero to Ninja site dedicated to learn AngularJS. One of the common complains about AngularJS is it’s documentation, which to the eyes of the newcomers can be cryptic and hard to digest. In part the problem comes from the fact that AngularJS is still a young technology but also because there are usually multiple ways to do things.
This is my personal list of sites, blogs, videos and other learning resources that I’ve collected since I started learning AngularJS. Hopefully will help you get started faster.