This is the first part of a series of posts that will approach different ways of styling Angular applications. Angular is a very powerful platform for developing web applications, and allows for many different ways that styling can be done, with different benefits and drawbacks and also different tastes when it comes to making the decision of how to style the app you are building.
Right before the final release of Angular 2, NgModule() was introduced. This was kind of a surprise for some people (myself included) but there was a higher purpose to the inclusion of such a concept, and that was to enable easy lazy loading of these modules.
Let’s analyze how NgModule() works, what it is and how it can help to enable lazy loading in Angular 2 applications today. In this case we will be using Webpack.
The last couple of months I have been on and off trying to get carte blanche working with Angular 2 by making a Carte-blanche-angular2 plugin. This has provided some interesting challenges especially on how to render dynamically components at runtime using the Angular runtime compiler. The approach I took went through several changes during RC periods but I will focus on the last one which is the one compatible with the final release of Angular2 using NgModules.
Angular 1 is not dead!
As Angular 2 get’s a lot of momentum, Angular 1 seems to be a little off in the choices of developers for building new apps, but a big amount of apps are still being run in Angular 1. And fortunately the Angular team has made a big effort in getting Angular 1 up to speed with the latest of the web, as component architecture approach and one way direction data flow.
If you have been developing with Angular for some time, you probably have used or have heard about Firebase.
Firebase lets you build real-time applications with very little effort, providing you with a backend technology out of the box that automatically synchronizes every connected device, providing authentication and some other nice services on top of that. It was also recently updated with a full set of new services on top of the real-time database, so right now Firebase consists more or less of :
These are some great tools that solve a common problem on how you handle different parts of your application that “care” about some part of the application state. That can be a header component that is showing a value of a total of sales that gets calculated somewhere else in the app or a user picture that gets changed and needs to be updated in the sidebar component.
Most of the people watching ngConf 2016 a couple of weeks ago would not expect to see a PHP CMS logo along side with Angular’s logo in the slides of a Keynote at the conference. But that was exactly what happened, when the weather.com channel people went on stage to talk about how they have been using Angular1 for a long time on the most traffic heavy Drupal site on the world, and how they recently adopted Angular2 as well.