Category Archives: JavaScript

Home / JavaScript
97 Posts

A while back, I needed a simple way to create a table with parent/child details in Angular. ng-repeat has some handy little known features to make creating this type of table easy.

More Link

Earlier today a colleague asked me how one would go about grouping data within an ng-repeat. I had never actually had to do this before, which made it an interesting problem to solve.

More Link

In continuing to build upon my previous project to get Angular2 working with Visual Studio 2015, I’ve been playing with routing and components.

While routing and components are very different when compared to Angular v1, it’s still pretty straight forward to get a basic application up and running.

More Link

Last night, I was playing with the latest .NET Core tooling in Visual Studio 2015 and decided to create an Anuglar2 application. It is not a straight-forward process. Additionally, most tutorials that you will see floating around don’t deal with Angular2 RC4 (v.Latest). And the few that do either aren’t Visual Studio 2015 specific or aren’t targeting ES5 as required by IE11 or older.

More Link

I’ve been reading up on Angular2, Redux, React and other various libraries and frameworks over the weekend.

I’m in the process of understanding what using Redux w/ an Angular2 app provides that using a singleton service doesn’t. But, it seems to be more about preference (imho) than real-world benefit. It may help tie into observable / push notifications to make state change detection between immutable / mutable objects more performant. However, I can see a benefit if one wants to swap out frameworks and allow their previous state management work across frameworks. It’s an interesting prospect from that perspective.

More Link

Earlier, I wanted to play around with Angular CLI, but my npm and node versions were out of date. The Angular CLI npm install would fail.

Fortunately, there is a straight-forward update method.

On github, the Microsoft team has placed a method for updating node through PowerShell:

https://github.com/felixrieseberg/npm-windows-upgrade

I was happy to stumble upon this on Github. After using the script in the recommended fashion, from an elevated PowerShell console, the Angular CLI npm installer worked without a hitch.

Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install --global --production npm-windows-upgrade
npm-windows-upgrade

Since writing my previous blog post on an Angular reusable table directive, this directive has been updated quite a bit.

The github source and demos reflect the latest code, but I want to detail some of the major changes.

More Link

angular_small
I was playing around with my trusty multi-select dropdown earlier today and a colleague of mine pointed out that changing the selected items outside of the directive would not actually deselect previously selected items. This was a curious bug since I knew I had a watcher on the ngModel selections.

More Link

Yesterday, I was fixing up a web view/page that contained nested Angular ui-router states to achieve parent/child detail. Interestingly, I discovered I was doing things the hard way.

More Link