What is Angular 2?
Who uses Angular 2?
Angular 2 Integrations
Why developers like Angular 2?
Here are some stack decisions, common use cases and reviews by companies and developers who chose Angular 2 in their tech stack.
One TypeScript / Angular 2 code health recommendation at Google is how to simplify dealing with RxJS
Observables. Two common options in Angular are subscribing to an
Observable inside of a Component's TypeScript code, versus using something like the
foo | async) from the template html. We typically recommend the latter for most straightforward use cases (code without side effects, etc.)
I typically review a fair amount of Angular code at work. One thing I typically encourage is using plain
Observables in an Angular Component, and using
foo | async) from the template html to handle subscription, rather than directly subscribing to an observable in a component TS file.
Subscribing in components
Unless you know a subscription you're starting in a component is very finite (e.g. an HTTP request with no retry logic, etc), subscriptions you make in a Component must:
- Be closed, stopped, or cancelled when exiting a component (e.g. when navigating away from a page),
- Only be opened (subscribed) when a component is actually loaded/visible (i.e. in ngOnInit rather than in a constructor).
AsyncPipe can take care of that for you
Instead of manually implementing component lifecycle hooks, remembering to subscribe and unsubscribe to an Observable,
AsyncPipe can do that for you.
#Typescript #Angular #RXJS #Async #Frontend
When designing the architecture for #Configcat , we were dreaming of a system that runs on a small scale on low-cost infrastructure at the beginning and scales well later on when the requirements change. Should be platform independent, high performing and robust at the same time. Since most of our team were born and raised using Microsoft's enterprise-grade technologies in the last decade, we wanted to build on that experience. Finding the best solution was quite challenging. Finally, we came up with the idea of a .NET Core backend because it runs on all platforms highly scalable and we could start up with 5$ Linode Linux server. As a #frontend framework, we have chosen Angular mostly because of TypeScript which felt familiar and was easy to get used to after strongly typed languages like C# and the community support behind Angular 2 is awesome. Visual Studio Code makes the coding sessions with Live Share great fun and very productive. MySQL as a database is again is very affordable in the beginning, performs great a scales well and integrates with .NET Core's Entity Framework super easy.
When Redash was created 5 years ago we chose AngularJS as our frontend framework, but as AngularJS was replaced by Angular 2 we had to make a new choice. We decided that we won't migrate to Angular, but to either React or Vue.js. Eventually we decided to migrate to React for the following reasons:
- Many in our community are already using React internally and will be able to contribute.
- Using react2angular we can do the migration gradually over time instead of having to invest in a big rewrite while halting feature development.
So far the gradual strategy pays off and in the last 3 major releases we already shipped React code in the Angular.js application.
More than year ago I was looking for the best editor of Angular 2 application and I've tried Visual Studio Code and Atom. Atom had performance issues that put me off completely to use it again. Visual Studio Code became my main editor #Typescript files (and partly editor of #Java files). I'm happy with Visual Studio Code and I've never look back on Atom. There wasn't any reason to try Atom again, because Visual Studio Code fulfills my requirements very well. I use it for editing of TypeScript, #HTML, #Sass, JSON, Docker and Markdown.
We chose Angular 2 (version 7 actually) because our product has a rather complex backend, most of which is visible only to our employees and contractors.
The "full featured" approach of Angular as well as the way it deals with the data model suited this business case well. We also use the Reactive Forms module a lot, as well as Clarity (an Open Source design system by VMWare) for the internal parts of the frontend. We also intend to use Angular's offline features.
I found Heroku to be a great option to get ExpressJS up and running with very little hustle. The free tier is great, but I'd recommend to set up a cronjob to visit your site every few minutes so that the server stays awake. Netlify was the option to host the front-end because doing the server side rendering on #Heroku would have taken a little more time than I'd like to. For the moment pre-rendering the app with prerender-spa-plugin is enough to help with #seo. Puppeteer was my choice over other options because it made it easier to scrape websites made on ASP.NET which is what I needed in this case. And Vue.js is my top choice at the moment because it's really beginner friendly and it has a lot of the features I like about Angular 2 and React. vuex is a must in most of the app I build.