Sha256: 9f3f8be9713d17b26e0f40065134ad508e55adac4cee8191b6e2208da4df20a0
Contents?: true
Size: 671 Bytes
Versions: 1
Compression:
Stored size: 671 Bytes
Contents
angular.module('EssayApp.services') .factory('orderPartService', ['$window', '$http', '$q', ($window, $http, $q) -> api = {} api.get = (part_id = null)-> data_url = "#{$window.location.pathname}/part.json" data_url = "#{$window.location.pathname}/part/#{part_id}.json" if part_id? $http.get(data_url) api.create_note = (part_id = null, data)-> data_url = "#{$window.location.pathname}/notes.json" data_url = "#{$window.location.pathname}/notes/part/#{part_id}.json" if part_id? $http.post(data_url, JSON.stringify({note: data}), { headers: { 'Content-Type':'application/json' } }) return api ])
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
translation_cms-0.1.5 | app/assets/javascripts/app/services/order_part_service.js.coffee |