UNPKG

unserver-unify

Version:

22 lines 633 B
'use strict'; angular.module('bamboo.common').controller('ChangeTextCtrl', function($uibModalInstance, title, content,$timeout) { this.content = content; // save the current course id this.title = title; var self = this; this.update = function() { $uibModalInstance.close(self.content); } this.updatePwd = function(form) { self.submitted = true; if (form.$invalid) { self.shaking = true; $timeout(function() { self.shaking = false; }, 500); return; } self.submitted = false; console.log(form); $uibModalInstance.close(self.content); } });