$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

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -