Using the Location service with @angular/upgrade

I don’t know if there is already a post somewhere about this, but when I had this problem a few weeks ago (more like 2 months ago) I couldn’t find anything about how to use the Location service from Angular 2 online.

So, you might be in the same situation I am where you’re migrating an Angular 1 web application to Angular 2 (I’m going to start calling Angular 1 NG1 and Angular 2 NG2 because… laziness), which means running both frameworks side by side. If your situation is similar to mine, you may be running NG2 components in your NG1 app and still using NG1’s router.

That’s cool and all, but now you may want to navigate to another route from within your NG2 controller. You could upgrade the $location service and use that, and that would probably be fine but, like me, you probably want to use NG2 services as much as possible so here’s how you setup the Location service in NG2. It’s actually quite simple.

Continue reading “Using the Location service with @angular/upgrade”

A Hello World using Aurelia + Webpack

Hello y’all! Recently I started looking into Aurelia as a replacement for Angular 1 and 2 as it seems like a very interesting framework. I still can’t say much about it as I’m just starting to play around with the framework but one of the things I like about it is the simple syntax the templates use and the fact that the ViewModels don’t require a lot of boilerplate code. After setting it up with JSPM and SystemJS, I wanted use Webpack because I use it at work and in most of my projects as I really like it, I also like to use only NPM to manage my dependencies.
Continue reading “A Hello World using Aurelia + Webpack”

Writing Express View Engines

The other day I was working on my JavaScript library HCAS (I’ll write a post about it at some point) when I decided to make it an Express View Engine because, why not?

So I started doing what any good developer would do, I went on Google to find some blog or StackOverflow post explaining how to do it and, surprisingly enough, it’s a bit hard to find resources on this subject, which is weird considering the amount of view engines for Express.

Continue reading “Writing Express View Engines”