Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please help me to add a custom 'PUT' request using type script. #1

Closed
rajeshmuraleedharan opened this issue Feb 2, 2016 · 2 comments

Comments

@rajeshmuraleedharan
Copy link

Please help me to add a custom 'PUT' request using type script.
attached is the dataAccessService.ts file screenshot from my app.
capture

@gr4b4z
Copy link

gr4b4z commented Feb 2, 2016

Create ActionDescriptor.

var updateAction : ng.resource.IActionDescriptor = {
method: 'PUT',
isArray: false
};
return $resource('/api/emailInboxConfig/:id', { id: '@id' }, {
update: updateAction
});

and
extend IDataAccessService by adding update method.
interface IDataAccessService extends ng.resource.IResourceClass<IEmail...>
{
update(IEmployee) : IEmployee;
}

@rajeshmuraleedharan
Copy link
Author

Thanks - it worked perfectly!. Attached is the latest code.
capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants