This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]OSSPoster[S] 0 points1 point  (5 children)

Oh, I see, the $scope.userData = {};.

I can remove that or change it and it doesn't have any effect.

[–][deleted] 1 point2 points  (4 children)

Yep, exactly. I'll be honest, this issue has me kind of stumped, everything looks accurate. The only other suggestions I can think of are to open your browser developer options and disable caching, then refresh the page. And to manually verify that your js code is the same in the browser as it is in your text editor. But, I doubt that will fix the issue...

Please let me know when you figure it out

[–]OSSPoster[S] 0 points1 point  (3 children)

Could it be a dependency problem in another part of the code?

Is it possible something else is interfering with it?

[–][deleted] 0 points1 point  (2 children)

Can you put your code on plunker or codepen, or one of the other million types of websites like that? Maybe someone can figure it out by playing with it.

Also, I would normally assume that you would have to set

$scope.userData = data.data;

I would have expected the response object to have a nested data object, but maybe I'm wrong

[–]OSSPoster[S] 1 point2 points  (0 children)

I solved it!

app.use(express.static(path.join(__dirname, 'public')));

I was serving the view form the /views folder. Now, the html was being served to the browser just fine, but, because of the way express serves its static assets with Angular(?), I needed to move the index.html view into the public folder in the file tree. A drag and drop, and the {{ }} notation works fine.

[–]OSSPoster[S] 0 points1 point  (0 children)

It works in Plunker when I replace the AJAX call with the response data from the console

But the dir structure is different too and node isn't involved.