diff options
Diffstat (limited to 'app/js')
-rw-r--r-- | app/js/controllers.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/js/controllers.js b/app/js/controllers.js index df097b5..2230603 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -28,10 +28,18 @@ app.controller('pointCtrl', function($scope, $http, pathService){ // $scope.line=constList; - $scope.addNewSongToGraph(id, titre, link, duration) + $scope.addNewSongToGraph = function(id, titre, link, duration) { - - } + var newSong = { + x:100, + y:100, + label:titre, + id:id, + link:link, + duration:duration + }; + $scope.points.push(newSong); + }; $scope.getColor = function(point) { |