Bonsoir tous le monde,
Est ce qu'il y a un moyen de rassembler c'est 2 factory dans une une
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 angular.module("crm").factory('getAllNotes', function getAllNotes($http) { return { notes: function(){ return $http.get("/crm/leads/notes-list/id/101"); } } }); angular.module("crm").factory('insertNote', function insertNote($http) { return { note: function(note){ console.log(note); return $http({ method: 'POST', url: 'request-url', data: "message=" + 'hello word!', headers: {'Content-Type': 'application/x-www-form-urlencoded'} }); } } });
Partager