mirror of
https://github.com/Foltik/Shimapan
synced 2025-01-07 08:42:49 -05:00
Fix component definitions to work with minifying
This commit is contained in:
parent
582b1260a2
commit
2f5156c198
@ -1,4 +1,6 @@
|
||||
function LoginController($scope, AuthService) {
|
||||
angular.module('LoginComp', ['AuthSvc']).component('loginComponent', {
|
||||
templateUrl: '/views/shimapan/login-form.html',
|
||||
controller: ['$scope', 'AuthService', function ($scope, AuthService) {
|
||||
$scope.login = function () {
|
||||
AuthService.login({
|
||||
username: $scope.username,
|
||||
@ -7,9 +9,5 @@ function LoginController($scope, AuthService) {
|
||||
alert('Logged In');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
angular.module('LoginComp', ['AuthSvc']).component('loginComponent', {
|
||||
templateUrl: '/views/shimapan/login-form.html',
|
||||
controller: LoginController
|
||||
}]
|
||||
});
|
@ -1,4 +1,6 @@
|
||||
function RegisterController($scope, AuthService) {
|
||||
angular.module('RegisterComp', ['AuthSvc']).component('registerComponent', {
|
||||
templateUrl: '/views/shimapan/register-form.html',
|
||||
controller: ['$scope', 'AuthService', function ($scope, AuthService) {
|
||||
$scope.register = function () {
|
||||
AuthService.register({
|
||||
username: $scope.username,
|
||||
@ -8,9 +10,5 @@ function RegisterController($scope, AuthService) {
|
||||
alert('Registered');
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
angular.module('RegisterComp', ['AuthSvc']).component('registerComponent', {
|
||||
templateUrl: '/views/shimapan/register-form.html',
|
||||
controller: RegisterController
|
||||
}]
|
||||
});
|
@ -1,4 +1,6 @@
|
||||
function UploadController($scope, Upload, $timeout, AuthService) {
|
||||
angular.module('UploadComp', ['ngFileUpload', 'AuthSvc']).component('uploadComponent', {
|
||||
templateUrl: '/views/shimapan/upload-form.html',
|
||||
controller: ['$scope', 'Upload', '$timeout', 'AuthService', function ($scope, Upload, $timeout, AuthService) {
|
||||
$scope.errToString = function (err) {
|
||||
if (err === 'maxSize')
|
||||
return "File too large.";
|
||||
@ -46,10 +48,6 @@ function UploadController($scope, Upload, $timeout, AuthService) {
|
||||
);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
angular.module('UploadComp', ['ngFileUpload', 'AuthSvc']).component('uploadComponent', {
|
||||
templateUrl: '/views/shimapan/upload-form.html',
|
||||
controller: UploadController,
|
||||
}],
|
||||
controllerAs: 'vm'
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user