(function () {
'use strict';
angular.module('myModule')
.service('myService', function ($http) {
function getMyList() {
return $http.get('assets/YourJsonData.json')
.then(function (response) {
return (response.data);
},
function (error) {
throw error.status + ": " + error.data;
});
}
return {
getYourListList : getMyList
};
});
}());
--
*Saju Thankathurai*
On Wed, Mar 30, 2016 at 11:35 AM, raja rushi <[email protected]>
wrote:
> how to view the static json data whihc is in service.js and view it in
> html page.
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.