migrated four files from js to ts

This commit is contained in:
Patrick O'Carroll 2017-11-24 13:38:54 +01:00
parent b752cfee1f
commit 015932fd02
5 changed files with 31 additions and 40 deletions

View File

@ -1,9 +0,0 @@
define([
'./inspect_ctrl',
'./json_editor_ctrl',
'./login_ctrl',
'./invited_ctrl',
'./signup_ctrl',
'./reset_password_ctrl',
'./error_ctrl',
], function () {});

View File

@ -0,0 +1,7 @@
import './inspect_ctrl';
import './json_editor_ctrl';
import './login_ctrl';
import './invited_ctrl';
import './signup_ctrl';
import './reset_password_ctrl';
import './error_ctrl';

View File

@ -1,13 +1,10 @@
define([
'angular',
'app/core/config',
'../core_module',
],
function (angular, config, coreModule) {
'use strict';
import config from 'app/core/config';
import coreModule from '../core_module';
coreModule.default.controller('ErrorCtrl', function($scope, contextSrv, navModelSrv) {
export class ErrorCtrl {
/** @ngInject */
constructor($scope, contextSrv, navModelSrv) {
$scope.navModel = navModelSrv.getNotFoundNav();
$scope.appSubUrl = config.appSubUrl;
@ -17,7 +14,7 @@ function (angular, config, coreModule) {
$scope.$on('$destroy', function() {
contextSrv.sidemenu = showSideMenu;
});
}
}
});
});
coreModule.controller('ErrorCtrl', ErrorCtrl);

View File

@ -1,12 +1,10 @@
define([
'angular',
'../core_module',
],
function (angular, coreModule) {
'use strict';
import angular from 'angular';
import coreModule from '../core_module';
coreModule.default.controller('JsonEditorCtrl', function($scope) {
export class JsonEditorCtrl {
/** @ngInject */
constructor($scope) {
$scope.json = angular.toJson($scope.object, true);
$scope.canUpdate = $scope.updateHandler !== void 0 && $scope.contextSrv.isEditor;
@ -14,7 +12,7 @@ function (angular, coreModule) {
var newObject = angular.fromJson($scope.json);
$scope.updateHandler(newObject, $scope.object);
};
}
}
});
});
coreModule.controller('JsonEditorCtrl', JsonEditorCtrl);

View File

@ -1,11 +1,9 @@
define([
'angular',
'../core_module',
],
function (angular, coreModule) {
'use strict';
import coreModule from '../core_module';
coreModule.default.controller('ResetPasswordCtrl', function($scope, contextSrv, backendSrv, $location) {
export class ResetPasswordCtrl {
/** @ngInject */
constructor($scope, contextSrv, backendSrv, $location) {
contextSrv.sidemenu = false;
$scope.formModel = {};
$scope.mode = 'send';
@ -37,7 +35,7 @@ function (angular, coreModule) {
$location.path('login');
});
};
}
}
});
});
coreModule.controller('ResetPasswordCtrl', ResetPasswordCtrl);