зеркало из https://github.com/mozilla/seasponge.git
fix(draw-route): clear old model data when creating new model
Fixes #57
This commit is contained in:
Родитель
b5d514a0a4
Коммит
eaaab8ddda
|
@ -9,7 +9,7 @@
|
||||||
###
|
###
|
||||||
angular.module('seaspongeApp')
|
angular.module('seaspongeApp')
|
||||||
.controller 'CreateController', ['$scope', '$location', 'model', 'config', ($scope, $location, model, config) ->
|
.controller 'CreateController', ['$scope', '$location', 'model', 'config', ($scope, $location, model, config) ->
|
||||||
|
|
||||||
console.log('model', model);
|
console.log('model', model);
|
||||||
|
|
||||||
$scope.title = "Example 1"
|
$scope.title = "Example 1"
|
||||||
|
@ -42,6 +42,8 @@ angular.module('seaspongeApp')
|
||||||
# Validate input
|
# Validate input
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
# Clear old model data
|
||||||
|
model.constructor()
|
||||||
# Save input
|
# Save input
|
||||||
model.title = $scope.title
|
model.title = $scope.title
|
||||||
model.authors = $scope.authors
|
model.authors = $scope.authors
|
||||||
|
|
Загрузка…
Ссылка в новой задаче