$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
Post a Comment