Managing state transitions is one of the hardest parts of building applications. This is especially true on the web, where you also need to ensure that the state is reflected in the URL. In addition, we often want to split applications into multiple bundles and load them on demand. Doing this transparently isn’t trivial.
The Angular router is designed to solve these problems. Using the router, you can declaratively specify application state, manage state transitions while taking care of the URL, and load components on demand. In this article I will discuss the API of the router, as well as the mental model and the design principles behind it.
As many of you know, I created an Angular 1.x styleguide back in July 2014, it’s grown in popularity since inception, and has served many teams across the world to be a reference to code consistency. Angular has also changed, and many of the practices used back then aren’t relevant today. As of now, the old styleguide is deprecated in favour of the new release.
Hosting an Angular 1 app is easy; you FTP a handful of files to a static web server and call it a day. But hosting an Angular 2 app—with its TypeScript code, node_modules dependencies, and “production mode”—is far more complex, and not as simple as a quick upload. In this article we’ll look at one way you can get an Angular 2 web app out to the world quickly using the Angular CLI and GitHub Pages.
I started out wanting to write a step-by-step guide for upgrading an app from Angular 1.5 to Angular 2, before I was politely informed by my editor that she needed an article rather than a novel. After much deliberation, I accepted that I needed to start with a broad survey of the changes in Angular 2, hitting all the points covered in Jason Aden’s Getting Past Hello World in Angular 2 article. …Oops. Go ahead and read it to get an overview of Angular 2’s new features, but for a hands-on approach keep your browser right here.
Component-based development is Angular 2’s most-loved feature. By now you should be familiar with using the @Component decorators to create components. You should be familiar with the required metadata information such as selector and template.
In my previous article on AngularJS, we got a look at the basic implementaion of AngularJS. In this article we will look at Filter Components, which are integral parts to angular.