angularjs-resource Questions
4
Solved
So nothing new here I am just trying to get some clarification and cannot seem to find any in other posts.
I am creating a new resource restulfully, say:
/books (POST)
with a body:
{
title: '...
Frightened asked 5/10, 2013 at 16:15
4
Solved
I'm testing Protractor with a small AngularJS app.
This is the test:
describe('Testing Protractor', function() {
var draftList;
it('should count the number of drafts', function() {
browser.ge...
Monegasque asked 2/11, 2013 at 12:28
3
Solved
My factory for making request is here:
angular.module('myapp').factory('testResponse',
['$http', '$resource', 'AppConfig', '$routeParams', '$rootScope',
function($http, $resource, $routeParams, ...
Stieglitz asked 26/12, 2014 at 10:5
1
I am trying to fire abort request however, I am not getting $cancelRequest object in result of $resource. But, I am able to get $promise and $resolved objects.
Why is this happening? How can I get...
Outboard asked 28/1, 2016 at 16:28
3
Solved
I'm willing to retrieve the response header of a resource request, cause I've put pagination information and something else in it rather than the response body, to make the REST api clear.
Though ...
Pardoes asked 6/4, 2014 at 18:40
3
Solved
I am using $resource and caching the results of get requests. My problem is that, after post requests, the cache is not being invalidated.
Here is the return value from the service:
return $reso...
Baras asked 4/8, 2014 at 11:15
4
Solved
In most cases the result of <custom-resource>.query() method is an array, which can be easily extended with some methods (business logics) with the following (factory) code:
var Data = $reso...
Landlubber asked 16/6, 2013 at 14:37
1
Solved
I made resource that receive records count from rest service as text plain. Angular makes an array of each chars from answer. For example if rest answers 20, angular will make array [2,0]. Can I fi...
Avebury asked 29/7, 2015 at 22:31
4
Solved
I am trying to add PUT to the default methods in ng-resource. So far I modified the DEFAULT_ACTIONS to:
var DEFAULT_ACTIONS = {
'get': {method:'GET'},
'save': {method:'POST'},
'update': {method...
Grizelda asked 5/1, 2014 at 16:33
3
I want to be able to tell whether an $resource instance has been modified by the user - that is, whether its current state is different than what has been initially loaded from the server &&...
Martyry asked 27/10, 2013 at 6:36
2
Solved
I have a factory that returns the $resource for my Article model:
angular.module('ADI.Resources').factory("Articles", ['$resource', function($resource) {
return $resource('/api/v1/article/:articl...
Puton asked 25/11, 2013 at 23:39
3
Solved
When trying to poll a custom method copies on an AngularJS Resource I get the following error at angular.js:10033: (The method copy works just fine.)
TypeError: undefined is not a function
at http...
Wail asked 12/5, 2014 at 12:32
5
I have a model, defined using $resource, that I am successfully loading.
Each loaded instance is, as promised, an instance of the class I defined.
(The example below is from the Angular docs. In...
Salvador asked 9/5, 2013 at 0:10
3
Solved
I have build a directive for pagination that takes two arguments; the current page and the total number of pages.
<pagination page="page" number-of-pages="numberOfPages"></pagination>
...
Scruple asked 7/2, 2015 at 22:55
3
Solved
I have few resources written on AngularJS that access a Tastypie API. Everything works fine, except for a detail: tastypie always encapsulate the actual result inside a objects attribute on a JSON,...
Corinecorinna asked 26/6, 2013 at 0:59
1
Solved
Using Tastypie and AngularJS $resource I would like to perform a set of update, create and delete operations.
Currently, I broadcast an event:
$rootScope.$broadcast('save');
That event is captu...
Distribution asked 29/9, 2014 at 14:21
2
Solved
I am trying to decorate the returned data from a angular $resource with data from a custom service.
My code is:
angular.module('yoApp')
.service('ServerStatus', ['$resource', 'ServerConfig', func...
Pinkster asked 21/2, 2014 at 7:18
2
Solved
I'm using AngularJS 1.2.1's ngResource and I'm trying to send null as a value in the parameters in a PUT request. Unfortunately, when it is set, Angular will ignore it the parameter and not send it...
Tuner asked 11/3, 2014 at 2:10
4
Solved
I'm currently trying to fill a kendo grid with remote data.
Kendo has its own function to fetch the data, but I want to use the angular factory which I created.
So I have a factory, which has a fu...
Prefatory asked 10/10, 2013 at 7:43
2
Solved
Suppose I have a resource set up like this:
resource = $resource(
"http://foo.com/service/:type/:id",
{},
{save: {method:'PUT', params: {type:'@type', id: '@id'}}}
);
resource.save({type:'user'...
Genuflection asked 22/10, 2013 at 22:25
1
Solved
I'm very new to Angular, so hopefully I know enough to ask what seems like a reasonable design question.
I'm charting some data via Angular, and am using $resource. Before bringing Angular in to t...
Muleteer asked 2/7, 2013 at 21:48
1
Solved
From the docs:
Class actions return empty instance (with additional properties
below). Instance actions return promise of the action
The documentations however doesn't clearly differentiate b...
Bengali asked 24/4, 2014 at 7:4
3
Solved
I have an angular resource that goes something like this
app.factory('User', function ($resource) {
return $resource(
'/api/user/:listCtrl:id/:docCtrl/', {
id: '@id',
listCtrl: '@listCtr...
Schaffer asked 8/8, 2013 at 23:52
3
Solved
I'm calling a back-end server that I cannot control. Currently it's using jQuery ajax like this:
return $.ajax({
type: "POST",
url: "/api/cases/store",
contentType: "application/json",
data: J...
Solicitor asked 30/3, 2014 at 21:53
2
Solved
How do I get a null response from a $resource?
I am running this:
angular.module("services").factory('Member', function($resource) {
var Member = $resource('/api/v1/member.json');
Member.curre...
Nore asked 22/1, 2014 at 19:52
1 Next >
© 2022 - 2024 — McMap. All rights reserved.