$location.path() vs $http.get() - AngularJS -


what difference between $location.path() , $http.get() in angularjs ? both seem working same way in application (i'm using calls in function of application's controller respond form submission) , feel i'm missing something.

any appreciated. thanks.

$http.get() used api call, typically retrieve data function.

the $http service has functions post, put, delete, etc... http verbs included call external api.

$location.path() used changing url of application, $location service can issue requests , reading/changing url of own, internal application


Comments

Popular posts from this blog

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -