Let’s say you had a syntax like ng lint –format stylish on your package.json before Angular 6. Running this after you update to Angular 6 will result in the following error: Architect command with multiple targets cannot specify overrides. This error is not much of help when you know that before update the linting worked fine. For this […]
Angular
Deepcopy of JavaScript Objects and Arrays using lodash’s cloneDeep method
While developing JavaScript applications, often we need to make copies of Objects or Arrays containing Objects. Then we want to work with those copies without affecting the original objects. In a common scenario, we are going to deal with a simple, one level Object (an Object without other Objects nested inside), like in the following […]
How to run Angular tests on CI Docker Container with Chrome
In this article, we are going to learn how to run the tests of an Angular solution generated with @angular/cli into a Docker Container without changing any of the initial configuration generated by @angular/cli. This is very important in the context of Continuous Integration workflow when you want to run your tests as you commit […]
Angular Service Worker landed on @angular.cli 1.6
With Angular 5 version having implemented a new Service Worker customized for Angular apps and @angular/cli 1.6 building it into your Angular app, a further step towards Progressive Web Apps has been made. Why is this important? Progressive Web Apps (or PWA) are seen for many years now as the evolution of apps, bound to […]
Angular how to dynamically inject a component to DOM
Note: given the semver adopted from now on by Angular team, I will refer to all versions of Angular2+ as Angular. For the old Angular 1.x, I will use AngularJs In this post, we’ll take a look on how to dynamically inject a component into the DOM using a directive as a placeholder and ViewContainerRef Angular class. For simplicity, we will declare a new […]
Angular.js share variables between controllers with service
Note: This article applies to Angular 1 and the example is written in ES5. Let’s say you have a directive where you have a button and once clicked you want an event to happen in another directive. The problem is that the two directives have different scopes, so passing the change directly is not possible. […]