Tags


All Angular Posts

The applications that I've implemented in Angular 4+ with `HttpClient` from `@angular/common/http` utilize JSON Web Tokens (JWT) for authentication from our server, which are then stored in the Angul...
By default, the Angular-CLI internal web server only listens on the *localhost* network interface (127.0.0.1). If you want to access your development web application from another computer, you can sta...
The Angular-CLI internal web server runs on port *4200* by default. To change the port number, launch it with the following command: ng serve --port 8888 ...
One of the nice features of SASS in your Angular-CLI app is that you can include an `@import "variables";` command to include the SASS variable definitions from an external file. You can easily make y...
You can globally include additional CSS/SASS style sheets into your Angular-CLI application by modifying your `/angular.json` file in the following hierarchy: `Root` -> `"projects"` -> `"my-project-na...
## Barrels It's considered good practice to separate Angular functionality into NPM modules for ease of re-use. The easiest way of importing modules is to import from the root of the module, and yo...
I recently ran into a problem where an Angular Component was still responding to Navigation Events even after having navigated away from that route. When subscribing to an Observable, be sure to stor...
When performing a GET or POST using Angular's HTTP service against a server with a different hostname than where the Angular application was served from, returned cookies are, by default, not accepted...
If you have multiple observables that you want to execute simultaneously, and be notified when they've completed, you use the `Observable.forkJoin()` function, passing it an array of Observables: ...
To update the Node Package Manager (NPM) to the latest stable version. Install N: sudo npm cache clean -f sudo npm install -g n Run N and request the latest stable version sud...
Angular 2 includes a Routing module that will automatically handle URL parameters that are implicitly passed in a URL. If you're not using Angular Routing, or if you're passing additional parameter...
Here is the TypeScript syntax to define custom getters and setters for variables: private _myVar: number get myVar(): number { return this._myVar; } set myVar(myVar) { this._...