From 6765db1e7839a146e6815f69c374cc3653820cf6 Mon Sep 17 00:00:00 2001 From: rugk Date: Sun, 5 Jun 2016 20:50:10 +0200 Subject: [PATCH 1/2] Add ng-change to form --- frontend/partials/upload.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/partials/upload.jade b/frontend/partials/upload.jade index c46eefe..40ffc35 100644 --- a/frontend/partials/upload.jade +++ b/frontend/partials/upload.jade @@ -15,7 +15,7 @@ .form-group .col-md-2.col-md-offset-8.control-label.text-muted(translate) Store for: .col-md-2 - select.form-control.input-sm(ng-model='expire') + select.form-control.input-sm(ng-model='expire', ng-change='updateexpire(expire)') option(value='1', translate) One day option(value='3', translate) Three days option(value='7', translate) One week From b6fc1f63a1b63fe34d3e082ee5d273db21be1b46 Mon Sep 17 00:00:00 2001 From: rugk Date: Sun, 5 Jun 2016 20:52:47 +0200 Subject: [PATCH 2/2] Add update expire --- frontend/scripts/controllers.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/scripts/controllers.js b/frontend/scripts/controllers.js index 0bebbc9..b1d86e4 100644 --- a/frontend/scripts/controllers.js +++ b/frontend/scripts/controllers.js @@ -162,6 +162,10 @@ angular.module('imgbi.controllers', []) $location.path('/uploaded'); } }; + + $scope.updateexpire = function(expire) { + $rootScope.expire = expire; + }; } ]) .controller('uploaded', [