Recent Web Log Entries By Ben Nadel

Showing 1 - 11 of 11   < Prev | Next >

Grouping Nested ngRepeat Lists In AngularJS

Posted: February 28, 2013 at 9:20 AM by Ben Nadel

Tags: Javascript / DHTML

The other day, I wanted to output a list of values in AngularJS using ngRepeat; however, I wanted that list to be grouped into sublists. Out of the box, ngRepeat doesn't have any group-by control, like ColdFusion does . But, nesting ngRepeats is fairly straightforward if you take on the responsibility of creating the groups yourself. ... read more »

Comments (4)  |  Post Comment  |  Ask Ben  |  Permalink



POIUtility.cfc Now Hosted On GitHub

Posted: February 26, 2013 at 9:33 AM by Ben Nadel

Tags: ColdFusion

This is just a quick post to say that my old POIUtility.cfc is now hosted on GitHub . I cleaned the codebase up a little, adding some organizational folders; but, mostly, it was copied over as-is to GitHub. For those of you who have no idea what the POIUtility.cfc is, it's a ColdFusion component (and set of ColdFusion custom tags) that facilitat... read more »

Comments (9)  |  Post Comment  |  Ask Ben  |  Permalink


Exploring Sample Software Application Layers And Responsibilities

Posted: February 22, 2013 at 9:59 AM by Ben Nadel

Tags: ColdFusion

A couple of months ago, I summarized how I've been thinking about software application layers and the responsibility of those various layers . Of course, putting it on paper and putting it into action are two very different things. And, since then, I've found myself getting lost and confused as to which parts of the application belong in which la... read more »

Comments (12)  |  Post Comment  |  Ask Ben  |  Permalink



Using AtomicInteger To Create Uniquely Named CFThreads In ColdFusion

Posted: February 20, 2013 at 9:39 AM by Ben Nadel

Tags: ColdFusion

When you use CFThread to run code asynchronously in ColdFusion, all threads in a given request need to be uniquely named. This is (theoretically) because all threads in a single request can be accessed, by name, using the "cfthread" scope, regardless of where in the codebase they were spawned. Failure to provide a unique name will precipitate the ... read more »

Comments (11)  |  Post Comment  |  Ask Ben  |  Permalink


Mixing Static And Dynamic Data In An AngularJS Select Menu

Posted: February 19, 2013 at 9:54 AM by Ben Nadel

Tags: Javascript / DHTML

Due to the data-driven, two-way binding nature of AngularJS input elements, mixing static and dynamic data in a single Select menu can be challenging. If your data it completely dynamic, it's a total breeze. But, the moment you want to add a static option, suddenly you have an asymmetric list of references that need to be mapped on to your View Mo... read more »

Comments (0)  |  Post Comment  |  Ask Ben  |  Permalink


Adding An ngRepeat List Delimiter In AngularJS

Posted: February 17, 2013 at 1:23 PM by Ben Nadel

Tags: Javascript / DHTML

Recently, I played around with an AngularJS directive that compiled and transcluded its target element . That experiment left me a little confused as to how the compile step actually worked; so, I wanted to take a step back and look at compiling an element with fewer facets. This time, rather than transcluding, I'm simply going to compile the DOM... read more »

Comments (11)  |  Post Comment  |  Ask Ben  |  Permalink


Using ngController With ngRepeat In AngularJS

Posted: February 15, 2013 at 4:20 PM by Ben Nadel

Tags: Javascript / DHTML

Most of the time, when you use the ngController directive in AngularJS, you're associating a Controller with a relatively static part of your user interface (UI). When it comes to ngRepeat, however, you can still use ngController - you just have to realize that you're creating a controller instance for every clone that gets created in the ngRepeat... read more »

Comments (19)  |  Post Comment  |  Ask Ben  |  Permalink


Directive Link, $observe, And $watch Functions Execute Inside An AngularJS Context

Posted: February 13, 2013 at 9:56 AM by Ben Nadel

Tags: Javascript / DHTML

When you run code inside an AngularJS Controller or Service object, you never have to worry about calling $apply() since your code is executing inside of an AngularJS "context." By this, I mean that AngularJS is aware that your code is running and will perform a dirty-check after the code has completed. When you're inside a Directive, however, Ang... read more »

Comments (2)  |  Post Comment  |  Ask Ben  |  Permalink


Using jQuery Event Delegation In AngularJS

Posted: February 12, 2013 at 9:52 AM by Ben Nadel

Tags: Javascript / DHTML

AngularJS is a very different beast when compared to jQuery (or vanilla JavaScript). In AngularJS, "context" is truly a first-class citizen. By that, I mean that AngularJS executes every piece of code in a specific container that is limited in scope. Unlike binding normal onclick event handlers, which have the entire document as a context, an ngCl... read more »

Comments (6)  |  Post Comment  |  Ask Ben  |  Permalink


Exploring Directive Controllers, Compiling, Linking, And Priority In AngularJS

Posted: February 9, 2013 at 6:41 PM by Ben Nadel

Tags: Javascript / DHTML

Recently, I talked about using Controllers inside of AngularJS Directives as a way to facilitate inter-directive communication . For simple directives, this seems to work great; however, I recently ran into a wall when trying to use directive controllers in conjunction with a directive that also had a compile() function. In my case, a non-compile... read more »

Comments (2)  |  Post Comment  |  Ask Ben  |  Permalink


Using Controllers In Directives In AngularJS

Posted: February 1, 2013 at 5:46 PM by Ben Nadel

Tags: Javascript / DHTML

In AngularJS, you have your Views, which present data to the user; you have your Controllers, which manage the $scope (ie. view model) and expose behavior to the View; and, you have your Directives, which link user interactions to $scope behaviors. But then you also have a special kind of Controller - a Directive Controller. The Directive Controll... read more »

Comments (16)  |  Post Comment  |  Ask Ben  |  Permalink

Showing 1 - 11 of 11   Pages: 1 < Prev | Next >

January 2013 Entries »

View All Blog Entries »

  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 22, 2013 at 5:35 PM
Script Tags, jQuery, And Html(), Text() And Contents()
This is still an issue 2 years later. jQuery is supposed to remediate these cross browser issues, no? I have been unable to find any statement from the jQuery team calling this behavior "by de ... read »
May 22, 2013 at 12:44 PM
Ask Ben: Query Loop Inside CFScript Tags
In cf10, if you call a function that has: local.result = {}; local.result.msg = ""; local.svc = new query(); local.svc.setSQL("SELECT * FROM..."); local.obj = local.svc.exe ... read »
May 22, 2013 at 12:29 PM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Ben: What version of Java are you using? Also, did you test users.id to see what Java reports as the data type? I wonder if it's not a Java primitive data type, but getting returned as something ... read »
May 22, 2013 at 11:47 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Dana, Awesome - so it looks like this bug was fixed in ColdFusion 10. Thanks so much for double-checking that. ... read »
May 22, 2013 at 11:37 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
When I c&p and run on cf10, I get: Selected User IDs: 1,4 User 1 selected: YES - YES User 2 selected: NO - NO User 3 selected: NO - NO User 4 selected: YES - YES User 5 selected: NO - ... read »
May 22, 2013 at 11:27 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Tom, Good thought, but no dice. Both of these still exhibit the same behavior: users.id[ users.currentRow ] users[ "id" ][ users.currentRow ] It's just something whacky happening with ... read »
May 22, 2013 at 11:07 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
Could your problem be that "users.id" is actually an ARRAY, not a single value? Perhaps try it again with "users.id[1]" (I only have CF8 here at work). ... read »
May 22, 2013 at 7:52 AM
Nested Views, Routing, And Deep Linking With AngularJS
Hi, Just a quick thank you. As it happens, for my own purposes, the pending ui-router work being done in native angular is likely the one I'll adopt, but your exploration, code and documentation of ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools