Category Archives: Angular

Angular 6 – Cannot resolve crypto, fs, net, path, stream when building Angular

My current setup is Angular 6.1.0 with Angular Universal too but the project is based on an old (dead) project which was built on Angular 5. Upon building the server side assets, the builder throws a lot of error saying … Continue reading

Posted in Angular | Tagged , | Leave a comment

Angular 6.x – 404 page with correct header using Angular Universal

Based on my previous post about adding a 404 page in Angular 4.x, I have added a tweak to return the correct 404 status code header. This process, however, requires the Angular Universal integration. This post assumes that you already … Continue reading

Posted in Angular, Web Development | Tagged , , | 1 Comment

Angular 6 – Add scroll to top when route changes

Since Angular apps are SPAs, the page does not reload when navigating through the application/website. If you happen to scroll to the bottom of the page and clicked a link, the next page will show the content near the bottom … Continue reading

Posted in Angular, Web Development | Tagged , | Leave a comment

Setting Title Tag for Angular Applications

Due to the nature of Angular apps being SPAs (single page application), historically, changing title tag or meta tags are not supported by default. However, due to SEO reasons, these features were added and works best when used in Angular … Continue reading

Posted in Angular, SEO, Web Development | Tagged | Leave a comment

Angular 6 – Configure Angular Universal with pm2

Angular Universal allows Angular apps to be run in both the server and in the browser. Before, I used the plain Express server to serve the static Angular application and I used the pm2 tool to manage the server process. … Continue reading

Posted in Angular, NodeJS, Web Development | Tagged , , | Leave a comment

Using Angular-CLI with Yarn

Recently, I have switched from npm to yarn, however, it seems that my Angular CLI still uses npm. To configure Angular CLI to use yarn globally, just run this: For Angular 6 and above: For below Angular 6: This is … Continue reading

Posted in Angular | Leave a comment

Angular 6 Now Available

I got a very short window of opportunity to update my dead projects to the latest NodeJS and Angular and I just checked that Angular 6 is now available. My portfolio site, which was built on Angular 4.4 has been … Continue reading

Posted in Angular | Leave a comment

ExpressJS – Serve a Google Verification Page

My portfolio website is using Angular served by ExpressJS. For more than six months, I forgot to check my Google Webmaster tool and it shows that I don’t own the site anymore. What a shame! I have to verify the … Continue reading

Posted in Angular, NodeJS | Tagged , | Leave a comment

Angular 4.x – Add a 404 page

For a frontend application like Angular, the 404 page is served by the frontend application rather than the web server. To make this work, we should always return the index.html of our angular application for all applications, except for asset … Continue reading

Posted in Angular | Tagged , , | 6 Comments

Angular 4.x and Beyond – Twitter Bootstrap Nav Bar Not Working in Mobile

Yesterday, I have deployed my personal site into production which is built with Angular 4.x using an old template (Twitter Bootstrap 2.x). I just recently noticed that the navigation menu is not expanding when viewed in smaller screens. It is … Continue reading

Posted in Angular | Tagged , | Leave a comment