Category Archives: JavaScript

Home / JavaScript
97 Posts

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

Last year, I provided a brief synopsis of a project structure and conventions that i use with Angular.

Over the course of a year though, this structure has evolved.

More Link

Often, web applications aren’t deployed to the root path of a web server. Also, often, developers (me included) develop applications with the intent of deploying to the root path.

Overcoming this problem with an Angular app, while also making a local build against IIS Express and a production deploy work, is relatively straight forward.

More Link

With a current application project in which I’m using Angular’s built-in currency filter, the value, when negative, was properly enclosed in parenthesis.

However, an Angular update (to v1.5) changed this behavior.

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

In my previous posts regarding advanced Angular navigation, I showed how to create a menu and use the $state provider(s) to track the current state, which menu option is active, and how to move between states using ui-sref. This particular demo used an in-line service called “menuService.”

This is a pretty solid mechanism for navigation, but I wanted to also take a look at doing something similar with the same navigationService, ui-router, and ui-bootstrap tabs.

More Link

If you recall my previous post on Node.js, I explored developing a Node.js app with Visual Studio. Using this approach makes it very easy to deploy and test with Visual Studio directly to Azure. However, I wanted to work with a more cross-platform approach using Visual Studio Code and continuous deployment with Azure’s Github integration.
More Link

SignalR is a nice framework for broadcasting messages to all clients connected to your web server. It also provides mechanisms to allow those clients to send messages to other clients. It’s not “Angular friendly” out of the box, though, since it’s designed more for use with (imho) jQuery. Here’s a simple service that I like to use with SignalR and Angular

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