Home » Archive by category "Angular 2"

NgRX 4 Actions – Class vs Object Literal

When NgRX 4 came out and I discovered that the “right” way of creating Actions is to use TypeScript classes and not Object Literals, I was a bit surprised.  Why would you use a Class that requires you to use the “new” keyword?  Why would you put multiple classes in one file?  This is insane!

NgRX 4 Actions - Class vs Object Literal
Photo credit: dkobras via Visual hunt / CC BY-SA

Continue reading “NgRX 4 Actions – Class vs Object Literal”

Using NgRX to Cleanly Aggregate Data

For the last 18 months, I’ve been working for an organization that has what some might consider a unique requirement.  Because of where our application’s data is sourced, we need to aggregate data on the client side rather than on the server.  What this means is that for any one screen, we may make multiple calls to the server to grab all the data we need.  Fortunately, because we adopted NgRX early in our adoption of Angular, we could avoid a lot of the headaches associated with client-side aggregation.

Using NgRX to Cleanly Aggregate Data
Photo credit: NASA Goddard Photo and Video via Visualhunt / CC BY

Continue reading “Using NgRX to Cleanly Aggregate Data”

This One Tweak Improved my Angular Code

I made a tweak to my Angular code process over the last month or so that has resulted in greater productivity in my development environment and fewer bugs.

Now, I didn’t make this change because I thought it would improve my productivity.  At least that wasn’t the primary reason.  I made the change because I thought it would reduce the chance of introducing bugs into my code.  And while it does reduce the number of bugs in my code, the result has been generally improved productivity.

What is this great secret?

This One Tweak Improved my Angular Code
Photo credit: docoverachiever via Visual Hunt / CC BY

Continue reading “This One Tweak Improved my Angular Code”