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.

Angular prod build using “ng build /serve –prod”

Angular

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 […]

MD5 Hashing for JavaScript

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 = […]

Google Analytics Angular Service with Click Events

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: […]

Transpile issues using Yarn as the package manager.

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 […]

Lazy loaded components can’t use parent components.

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 […]