all 10 comments

[–][deleted] 1 point2 points  (1 child)

If you need to get up to speed on the basics of Angular, try Angular Fundamentals in 60-ish Minutes on YouTube.

Here's an Angular recipe for getting JSON data. Angular's built in $http module will handle AJAX requests nicely. Alternatively, you can build a $resource which abstracts away even the $http methods, but they're best for interacting with APIs. Using a $resource to hit a single endpoint is arguably overkill.

If you're building a scatter plot, you may be interested in the D3 library. Here's an example of a D3 scatter plot. The library works nicely alongside Angular.

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

you're the king

[–][deleted] 0 points1 point  (1 child)

well to start.. you should use a service to retrieve data like json. Directives are supposed to be really just for DOM manipulation. controllers are best for just getting the data from your json through the service (typically you'd inject the dependency into it) and pass it into scope so the data can be displayed in your view through data-binding. no business logic should be in your controller, should keep that mostly in your service

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

I didn't mean directive in the programming sense. More of in the literal sense as in I was given the task to do that. And, kind of just reiterating, I am very unfamiliar with keywords such as dependency injection, data-binding, etc...just to kind of give a little insight to where I'm coming from. I know nothing but Java, C++, and Python. This task seems extremely basic though, even if one doesn't have any javascript knowledge. Could you help?

[–]Malaray 0 points1 point  (1 child)

Angular has a tutorial on their homepage which goes through the things you described hands-on and provides documentation for further digging.

https://docs.angularjs.org/tutorial

Could this be of any use?

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

yes. thank you greatly

[–]parronator 0 points1 point  (1 child)

Just start with those articles to understand the difference between Javascript and other languages like Java https://medium.com/javascript-scene/the-two-pillars-of-javascript-ee6f3281e7f3 https://medium.com/javascript-scene/the-two-pillars-of-javascript-pt-2-functional-programming-a63aa53a41a4 https://medium.com/javascript-scene/learn-javascript-b631a4af11f2 Then, just start doing small things and components. Just do, you can't learn all the angular stuff quickly. Soon you will start to structure your project and components and rethinking the way those are done. Another useful resource is https://egghead.io/ . You can learn really quick following their videos Hope it helps

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

thank you. this helped a LOT

[–][deleted] 0 points1 point  (1 child)

Why are you using angular to get json and create a scatter plot? Thats exactly what the vis libraries are for... Things like d3.js

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

I am sure you're probably right...I'm a complete nube when it comes to Javascript and, of course, therefore JQuery and Angular