Upgrade ng2-alfresco-upload, code fixes

This commit is contained in:
Denys Vuika
2016-09-21 14:12:42 +01:00
parent 90646ce910
commit 6104c5d669
15 changed files with 194 additions and 63 deletions

View File

@@ -16,7 +16,7 @@
*/
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FORM_DIRECTIVES, ControlGroup, FormBuilder, Validators } from '@angular/common';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import {
AlfrescoTranslationService,
AlfrescoAuthenticationService,
@@ -30,10 +30,8 @@ declare let __moduleName: string;
@Component({
selector: 'alfresco-login',
moduleId: __moduleName,
directives: [FORM_DIRECTIVES],
templateUrl: './alfresco-login.component.html',
styleUrls: ['./alfresco-login.component.css']
})
export class AlfrescoLoginComponent implements OnInit {
@@ -62,7 +60,7 @@ export class AlfrescoLoginComponent implements OnInit {
@Output()
executeSubmit: EventEmitter<FormSubmitEvent> = new EventEmitter<FormSubmitEvent>();
form: ControlGroup;
form: FormGroup;
error: boolean = false;
errorMsg: string;
success: boolean = false;
@@ -217,7 +215,7 @@ export class AlfrescoLoginComponent implements OnInit {
* @param field
* @returns {boolean}
*/
isErrorStyle(field: ControlGroup) {
isErrorStyle(field: FormGroup) {
if (typeof componentHandler !== 'undefined') {
componentHandler.upgradeAllRegistered();
}