ATM: "Object #<Object> has no method 'find'"

Holy smokes, Bat-viewers! Today’s adventure took me down a rabbit-hole and then up out of an ant-hole.

So our focus this week has been on databases. Coolness - the stacks are really starting to feel complete. Today was our second (and final) day with Mongo. Our task for the day was to complete a functional backend and then modularize it. I struggled with some of the syntax to get the backend up and running, but lunch and asking the right people the right questions helped and I was finally up and running. Then I started to modularize my code. I kept getting informative error after informative error. I went through about a dozen silly little things in about five minutes. And then — brick wall! After staring helplessly at the error, not really understanding how I could get such an error, I sought our instructor’s assistance. Unfortunately, it was right at the end of class and he had to leave. So I was stuck with it.

Read More ...

ATM: Angular Module - Definition vs Loading

Angular uses a very similar statement to define a new module and to load an existing module. For example, the initial definition for my stage-hand app was:

1
var shApp = angular.module('shApp', []);

While the statement to load my stage-hand module (e.g., at the beginning of the controller and service files) was:

1
var shApp = angular.module('shApp')

Note that the only differences are , [] and ;, so it’s easy to make a mistake.

To make matters worse, the symptoms were really cryptic.

Read More ...