From eaaab8ddda981a8f70cee97a80052be08a5caa15 Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Wed, 1 Apr 2015 22:15:40 -0300 Subject: [PATCH] fix(draw-route): clear old model data when creating new model Fixes #57 --- app/scripts/controllers/create.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scripts/controllers/create.coffee b/app/scripts/controllers/create.coffee index 93ddd64..553ff49 100644 --- a/app/scripts/controllers/create.coffee +++ b/app/scripts/controllers/create.coffee @@ -9,7 +9,7 @@ ### angular.module('seaspongeApp') .controller 'CreateController', ['$scope', '$location', 'model', 'config', ($scope, $location, model, config) -> - + console.log('model', model); $scope.title = "Example 1" @@ -42,6 +42,8 @@ angular.module('seaspongeApp') # Validate input # TODO + # Clear old model data + model.constructor() # Save input model.title = $scope.title model.authors = $scope.authors