
Whenever we learn a new programming language or framework, we want to know how the hello world program is implemented.
Learning a lot of facts and techniques of angular is important, but it is also important to see all these isolated methods work together in a sample application.
Before we can start to develop an angular application, we need to prepare our system and install some tools that facilitate and automate our development process.
When writing a complex application in a team, it is important to set the stage properly and include some conventions. All team members need to be on the same page.
We all want to use the right tool for the job; developing an angular application is no exception. We get a quick overview of the most popular editors and IDEs
With directives, we attach behavior to DOM elements and make our application dynamic and an angular application.
Angular encourages the use of the MVC pattern. Behavior, that is, code belongs in the controller and not in the view.
In angular, the model is the data that we want to interact within our application. The scope is an object on which we define the model and the behavior, and it is the execution context for expressions.
Data binding is used to automatically synchronize data between the model and the view components. The view and controller are glued together by data binding.
When a user interacts with view components such as buttons, events are triggered. In angular code that is executed as a result of the event is implemented in the controller.
A dynamic web application needs to show and hide certain areas of the view depending on the state of the application.
Most line of business (LOB) applications provide some data entry for the user. Angular forms assist us in accepting and validating user input.
Views can get pretty complex quickly. We can use templates to componentize our views.
Sometimes, the use of static templates is not enough. We can use dynamic templates to change the display based on some criteria.
Often, we want to present the data we get from the backend in a sorted way, or we want to only show part of the data. Angular filters allow us to map, reduce, and sort data.
Realistic angular applications consist of many views. Using client-side routing, we can navigate from view to view.
Controllers and services often need to collaborate with or use other services. We can get hold of external dependencies using the dependency injection.
When we minify the JavaScript files variable, parameter names get shortened. Angular provides mechanisms that help avoid minification adversely affect dependency injection.
There are situations where we want to explicitly claim external services. In this case, we can use the angular injector service.
When do we put code into a controller and when do we create a service?
Services have a special life cycle in being singletons. Understanding its implications is crucial.
In a typical application, we need to load data from a server and push data changes to the server. Angular provides us with the $http service for such tasks.
If we want to share the data of business logic among controllers, then we should create our own custom services.
When creating a service, we can choose among five different recipes. We will learn how to choose the right one in different situations.
A lot of JavaScript code is asynchronous. Promises help us keep the complexity low.
The angular $q library provides us with the tools we need in order to write our own promises.
Often, we need to launch multiple asynchronous requests. Promises make it easy to run them either in parallel or in a sequence.
Often, remote requests to the server can take some time and the user wants to cancel the request. We will learn how to do this.
To execute tests written in JavaScript for our angular components, we need a test runner. The Karma test runner was developed by the angular team.
To write high-quality, maintainable unit tests, we need to understand the individual parts of a test.
JavaScript is a dynamic language. To create robust code, we need to cover the code with unit tests.
Unit tests need some setup. The module and inject functions help us achieve this.
Most applications communicate with a server. To test components in isolation, we need to mock server calls.
The HTML vocabulary is limited. We can define directives that extend the vocabulary.
Directives are components that should be isolated from their environment. This can be achieved by defining a private scope.
Directives often need to interact with their hosting environment. One-way and two-way data binding and callback binding can be used.
Sometimes, directives need to wrap arbitrary content. We can use transclusion for this.
Directives can be complex and as such, need to be thoroughly unit tested.
To run end-to-end tests, we need a test runner. The angular team has created Protractor for this job.
Manual tests are inefficient at best. Writing automated tests solves this problems.
Our views are complex and we need to access various elements in them.
AngularJS helps you build dynamic web apps quickly and easily. If you are looking for scalability and modularity in your apps, then AngularJS is the technology for you. It provides you with all the tools necessary to develop apps that are both attractive and functional.
This video course will show you how to write a complex application using AngularJS, one step at a time.
You will begin with preparing the system by setting up the necessary prerequisites. Then you will scaffold your application and write your first controllers and views using data binding to stitch them together. You will then move on to implementing your own custom services as well as directives to make your app flexible and extensible. Finally, you will turn your attention to testing the code before the course ends and you are ready to write your own Angular application.
You will start with an empty slate but by the end of the course, creating and implementing complex AngularJS applications will be easier than ever.
About the AuthorGabriel Schenker grew up in Switzerland on a wonderful farm located on top of a hill where the stars seem to touch the earth. He studied Physics at the Federal Institute of Technology in Zurich, Switzerland. There, he also got his PhD. in Physics. After working in behavioral science for a couple of years, which included training trainers, he went freelance as a software developer, consultant, mentor, and trainer. In 2009 he moved to Austin, Texas, where he is currently working as Chief Software Architect for a company writing software for pharmaceuticals, hospitals, and universities working in the area of new drug development.