In case you missed it, Node now supports async/await out of the box since version 7.6. If you haven’t tried it yet, here are a bunch of reasons with examples why you should adopt it immediately and never look back.
Source: 6 Reasons Why JavaScript’s Async/Await Blows Promises Away (Tutorial)
Articles for March 2017
Top 27 Angular 2 Components for Web Developers – Colorlib
It doesn’t often happen that a framework takes over the landscape of web development in just five years, but suppose that you either make something that sticks, or you don’t. Angular — which is Google built — managed to capture the hearts of developers early on, and has since flourished and evolved into one of the best JavaScript frameworks there are. Angular 2 introduces some bold moves that might be surprising to those who aren’t familiar with the mobile web, but Angular 2 is strictly focused as a mobile-first framework, meaning that desktop apps and websites would need to be built in reverse order. Wonderful strategy if you ask us, mobile is already surpassing all expectations, and as billions more get connected, it only makes sense that we build with mobile web in mind first.
Source: Top 27 Angular 2 Components for Web Developers – Colorlib
Angular 4: Changes in the router – Yakov Fain’s Blog
Angular 4 comes with some useful changes in the router. Let’s take a look at the changes in receiving parameters by a route and in the CanDeactivate
guard (see here).
Source: Angular 4: Changes in the router – Yakov Fain’s Blog
Stack Overflow Developer Survey 2017
This year, over 64,000 developers told us how they learn and level up, which tools they’re using, and what they want.
What’s new in Angular 4? – Ninja Squad
Technically there are some breaking changes, explaining that’s why the major version number has changed. And, if you missed it, there is no Angular 3: the router package was in version 3.x, so instead of bumping everything to 3.0 and the router to 4.0, the team chose to bump everything to 4.0.
The breaking changes are quite limited though, we updated several of our apps in a few minutes: nothing too scary.
TypeScript 2.1+ is now required (it was 1.8+ before), and some interfaces have changed or are deprecated (rarely used in most applications, like
OpaqueToken
orSimpleChange
).
Angular: Angular 4.0.0 Now Available
Angular version 4.0.0 – invisible-makeover – is now available. This is a major release following our announced adoption of Semantic Versioning, and is backwards compatible with 2.x.x for most applications.
We are very excited to share this release with the community, as it includes some major improvements and functionality that we have been working on for the past 3 months. We’ve worked hard to make sure that it’s easy for developers to update to this release.
TypeScript 2.1: External Helpers Library | Marius Schulz
TypeScript 2.1 introduces a new
--importHelpers
flag which causes the compiler to import helpers fromtslib
, an external helpers library, rather than to inline them into each file. You can install and versiontslib
just like any other npm package:
Source: TypeScript 2.1: External Helpers Library | Marius Schulz
Relative Template And Style URLs Using System.js Without moduleId In Angular 2.4.9
Once I learned that the in-browser TypeScript transpiler was dropping support for type-checking (one of the main reasons I’m using TypeScript), I decided it was time to start learning how to compile my Angular 2 demos offline using the tsc compiler. The tsc compiler can save the generated files to a different directory; but, in order to keep the relative templateUrl and styleUrls component meta-data working, I’m having the tsc compiler save the generated JS files right alongside the original TS files. As I was tinkering with this, however, I came across the Angular 2 Docs change-log in which they outlined a new way to load component-relative assets. Rather than providing the moduleId meta-data (and Node’s module.id token), they are using a System.js loader that translates relative paths on-the-fly as the application is loading. Since I’m still using System.js to load my already-compiled files, I figured this is a change that I should make in my Angular 2 demos as well.
Source: Relative Template And Style URLs Using System.js Without moduleId In Angular 2.4.9
Essential Angular: Dependency Injection
This is the fourth post in the Essential Angular series, which aims to be a short, but at the same time, a fairly complete overview of the key aspects of Angular. In this post, I’ll cover dependency injection.
Source: Essential Angular: Dependency Injection