AngularJS Tutorial: [#5] HTTP - Getting Started with AngularJS

preview_player
Показать описание

Get the course files!
Рекомендации по теме
Комментарии
Автор

Great tutorial. Very easy to follow. Important to note though that success( ) and error( ) are deprecated in favour a standard JS promise .then( ) which contains a success and error function reference.

SteveGriffith-ProfssorStv
Автор

This is really helpful. I am someone who is learning AngularJS and I am able follow and understand everything that's being covered here. Thank you.

pradyumnakaushik
Автор

Thank god for you folks commenting below, I was going crazy redoing this part several times. Thanks for the upgraded coding!

rdisalvo
Автор

Dear Ryan.... Angular is no longer support success and error function this works for mee

$scope.places = response.data;
});
});

anshuldawar
Автор

Thanks Steve! And yes, very good point on success and error being deprecated!

holodeck_run
Автор

Hi! Anyone who runs into the problem with success and error, use the new promise syntax in the controller code. Also remember to update the syntax for $http in the factory code.

ansh
Автор

Could you update the code so it wont use on success and error? not working for me with this code atm

albertomiconi
Автор

Im meeting the error of $http.get(...).sucess is not a function. Could you help it.

narindersharma
Автор

Maybe I'm missing a step here but I still get an error using the updated code. Error reads "Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https." so nothing populates and not sure what to do...

jaotree
Автор

After implementing data.json, it shows a blank page on the browser. Someone please help me fix this.

vishvasshukla
Автор

Hello guys, I am desperate: for hours I try to reproduce this part of the course. Without success. Can someone please provide the corresponding files for download or send me. Many many thanks!

jotube
Автор

This code is not working please tell me the solution


angular
.module('ngCribes')
.controller('ngController', function($scope, cribesFactory){
$scope.cribes;


$scope.cribes = data;
}).error(function(error){
console.log(error);

});

});

priyankapawar
Автор

Great tutorial Thanks a lot Ryan, this code works for me
{
$scope.cribs = data.data;
}, function(error) {
console.log(error)
});

PiyushChandel
Автор

angular
.module('ngSoulmax')
.controller('soulmaxController', function($scope, soulmaxFactory){
$scope.hello=this;

success(response){
$scope.hello=response.data;

console.log($scope.hello)
}, function error(err) {

console.log(err)
});

});

sulemanbader
Автор

Thanks buddy...
cribsController.js for me

angular
.module('ngCribs')
.controller('cribsController', function ($scope, cribsFactory) {
$scope.cribs;
(data) {
$scope.cribs = data.data;
}, function (error) {
console.log(error)
});
});

mayur