Have we got some good, easy to use tutorials for working with API's? Im writing a UI for an API im developing and want to really learn how to use AngularJS properly.
thanks
In Angular, the $resource service is designed specially for consuming REST services. You can find the documentation (and a few samples) for $resource at https://docs.angularjs.org/api/ngResource/service/$resource.
Related
Basically, I am building a massive app, using SailsJS and AngularJS.
I'm ratter new to both of them.
I've started this app with few Controllers, but seeing how it's getting messy, I started to move the interaction with my Backend API into Services (mostly the $http functions). I quickly noticed that the "asynchonousity" of it messed most of my logic.
I never used the $q of Angular, and $http kind of do it by itself so I looked online to see the best practice and found this post : AngularJS services and promises best practice
As it's from 2016, I was wondering if it is still considered the best practice, and if it is exactly like that that I should build my Services.
It still is considered the best practice. You can use Promise Chaining in order to structure your code timewise.
You may want to see this article for further details.
I am looking for good straight forward examples, tutorials, and books on AngularJs + Firebase that are up-to-date I have come across numerous tutorials on AngularJS + Firebase using simpleLogin.js which to my understanding is out-dated. I have read the quickstart documentation on firebase.com which provides examples on how to get started using firebase but not how to utilize firebase with angularjs. I am now go through codecacademy's Firebase API course but again it's not DI the api with angularjs it's showing standalone use.
It would be of great help if anyone can direct me to books on AngularJS + Firebase that are structured in the same way the authors of A Smarter Way To Learning JavaScript or Learning Ruby The Hardway have done.
When I was starting to learn Angularfire, I found this tutorial to be incredibly useful: https://thinkster.io/angularfire-slack-tutorial. It shows you how to build a "slack clone" using angular and firebase, and I think it's still up-to-date. It was the best tutorial I found outside of what firebase has on their site.
Hope that helps.
There are some good AngularJS/Firebase examples on https://www.firebase.com/docs/web/libraries/angular/.
I'm actually the author of the first example, "Wait and Eat". The app is open source, so you can learn a lot by just poking around in the code, and if you have any questions, you can ask me (my contact info is in the README).
I keep it up-to-date and it also follows best practices from the Angular Style Guide from John Papa.
If you want more guidance, I also have a video course where you build the app step-by-step as 22Ryann mentioned.
I would like to have a web app with Angular in Frontend and Symfony in Backend. I separated this into 2 single projects and now I want to let them communicate via REST.
Now here's the point I'm struggling a little. First of all, is the project separation the right approach? Also, I'm confused with building a REST-Service with the ngResource-factory in Angular. Can someone explain this to me, how to create a simple GET-Request (no params etc and just how to use the factory. Dependencies aren't a problem)? The tutorial on AngularJS doesn't really help. Do I need to create a JSON-File as well?
By the way, I'm new to these 2 frameworks.
Thanks in advance!
Disclaimer: I'm the author of API Platform
Take a look at API Platform. It's a solution to create REST API using Symfony (full stack).
The official tutorial explains how to create a REST API in a first project then an Angular client (using Restangular) in another project.
I've been reading up on AngularJS lately (always used jQuery) and I'm starting to understand and like it. Normally I would build webapplications with Laravel. Now i'd really like to dig further and learn about connecting these two frameworks to build an awesome SPA. In this case, Laravel serves as a REST api and Angular handles the front end. This article and also this video helped me a lot, but still raises questions.
The biggest one (maybe very stupid) is: could the HTML/CSS/JS be converted to a native mobile app, for example with PhoneGap? Because that is what I'm wishing to achieve if possible.
Also, if this is possible, is it a good way or does it get too tricky?
This is still very new to me, just need some help on the way. I hope my question makes some sence, thanks in advance.
I have started learning Laravel and Angular, for one of my project at university. I want to rebuild the website www.lolcalculator.com with these two frameworks but I cant figure out exatly the best way to do that. From Laravel I want the less posible, because I will focus on Angular.
Can someone with more experience help me?
For example, do I need to use routing on both sides? Which functions of the website I should cover with Laravel(Mailer, Auth, Routing...) and which using Angular?
I just need to understand a bigger image, not in details.
Tnx a lot.
All the best :D
There's quite some information on the net regarding Laravel and Angular, but this one in particular is one that I found useful: http://scotch.io/tutorials/php/create-a-laravel-and-angular-single-page-comment-application.
You may also want to consider writting a front-end app in Angular and a separate back-end app in Laravel. The back-end app can then expose an API, consumed by the Angular front-end.