One of my projects required a new Angular 6 project folder. I needed to scaffold the Angular 6 contents in an existing directory. The following command will generate a new Angular 2+ project in your current directory: Credits GitHub: Provide a way to generate a new project in an existing directory
Category Archives: Angular
With Angular, I am documenting all of my research and development techniques I find with Angular. This helps me remember important information and hope to help others as well.
While working on my Electron application my login functionality didn’t function anymore. Root Cause Updated Angular CLI and uglify also got updated. The newest uglify version breaks builds. Solution Run the following to temporarily go back to a working version: npm i [email protected] –save-exact && rm -rf package-lock.json node_modules && npm i && npm ls […]
I’ve recently switched back to using NPM from Yarn as my default package manager due to Angular project problems. The following two commands will let you switch between Yarn and NPM: # Switch to Yarn ng set –global packageManager=yarn # Switch to NPM ng set –global packageManager=npm The main reason that I had to switch […]
Gravatar requires the usage of MD5 hasing when it comes to pulling images from their website. To accomplish this, I’ve implemented several MD5 plugins from different authors. The plugin that integrated nicely (with no console errors) was JavaScript MD5. To implement this on an Angular Component/Service: import { Component } from ‘@angular/core’; var md5 = […]
I find myself updating Angular a lot (I’m currently on 4). One of the conversations I found with other Angular developers, there’s a website that helps explain the update process to a newer version. Here’s the site: https://angular-update-guide.firebaseapp.com/ Additionally, don’t forget about the official Angular website: https://angular.io/
Code documentation example with TypeScript. /** Class representing a point. */ class Point { /** * Create a point. * @param {number} x – The x value. * @param {number} y – The y value. */ constructor(x, y) { // … } /** * Get the x value. * @return {number} The x value. */ […]
This example will give your Angular application the ability to use gtag() and use the service to inject it in components needing Google Analytics push abilities such as events. seo.service.ts import { Injectable } from ‘@angular/core’; import { Meta, Title } from ‘@angular/platform-browser’; declare var gtag: Function; @Injectable() export class SeoService { constructor( private titleService: […]
While working on one of my Angular 4 apps, the transpiled output was displaying this on our production website that utilizes Docker NGINX:1.13 I’ve been using Yarn as my default package manager for many of my Angular web applications. I’ve experimented several techniques, and ultimately found that if I used “npm install” instead of “yarn […]
I’ve ran into an issue that I didn’t know about. At first, I thought this particular issue is a bug. It’s not but a feature of Angular 4. The Problem Lazy loaded components are unable to see parent-components that are already loaded. Solution We need to create a module that houses all the required components […]
Building a custom “yarn deploy” automation that automatically saves to S3 and creates CloudFront invalidation.