Tag Archives: javascript

Home / javascript
28 Posts

After my recent post on sorting within an Angular Component, I was chatting with another developer about JavaScript sorting. Some of my assumptions about data types and formats allow some edge cases to present themselves in the form of inaccurate sorting.

More Link

In an application that I’m currently working on, that deals with Sales data, there are instances when I need to apply date comparisons relative to a user’s local time. This is an interesting problem with which to deal.

More Link

Dates are pretty easy to manage with pure JavaScript. The other day though, I discovered a bug in a bit of date manipulating code.

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

Quite a while back, I wrote a blog post that detailed how it’s possible to use a directive to determine when an Angular repeater is finished. My solution, like nearly every other solution I looked at has one major flaw. It’s only triggered on first render.

More Link

Earlier this week, I needed a way to make users wait for a certain amount of time after performing an action on a web application. The Angular UI progress bar seemed like a fitting method to let the user know their wait time.

More Link

Client side validation is pretty handy. However, as we all know, you can’t fully trust any data sent to your server from a web client. As such, we generally duplicate validation in both the client and server side scenarios. This isn’t a big problem, but it does create a disconnect when the client validation passes, but then the server validation fails. Even in duplication, I still want server-side validation to play an integral part of the overall user experience.

More Link