Merge pull request #1383 from Alfresco/dev-mvitale-1370

Remove use of deprecated Services
This commit is contained in:
Mario Romano
2017-01-04 19:42:41 +00:00
committed by GitHub
29 changed files with 107 additions and 107 deletions

View File

@@ -19,7 +19,7 @@ import { NgModule, Component } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService } from 'ng2-alfresco-core';
import { CoreModule, SettingsService, AuthService, StorageService } from 'ng2-alfresco-core';
import { LoginModule } from 'ng2-alfresco-login';
@Component({
@@ -73,8 +73,8 @@ export class AppComponent {
public disableCsrf: boolean = false;
constructor(public auth: AlfrescoAuthenticationService,
private settingsService: AlfrescoSettingsService,
constructor(public authService: AuthService,
private settingsService: SettingsService,
private storage: StorageService) {
settingsService.ecmHost = this.ecmHost;

View File

@@ -18,8 +18,8 @@
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { DebugElement } from '@angular/core';
import {
AlfrescoAuthenticationService,
AlfrescoSettingsService,
AuthService,
SettingsService,
AlfrescoApiService,
CoreModule
} from 'ng2-alfresco-core';
@@ -43,10 +43,10 @@ describe('AlfrescoLogin', () => {
],
declarations: [AlfrescoLoginComponent],
providers: [
AlfrescoSettingsService,
AlfrescoAuthenticationService,
SettingsService,
AuthService,
AlfrescoApiService,
{provide: AlfrescoAuthenticationService, useClass: AuthenticationMock},
{provide: AuthService, useClass: AuthenticationMock},
{provide: AlfrescoTranslationService, useClass: TranslationMock}
]
}).compileComponents();

View File

@@ -19,8 +19,8 @@ import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import {
AlfrescoTranslationService,
AlfrescoAuthenticationService,
AlfrescoSettingsService
AuthService,
SettingsService
} from 'ng2-alfresco-core';
import { FormSubmitEvent } from '../models/form-submit-event.model';
@@ -79,8 +79,8 @@ export class AlfrescoLoginComponent implements OnInit {
* @param translate
*/
constructor(private _fb: FormBuilder,
public authService: AlfrescoAuthenticationService,
public settingsService: AlfrescoSettingsService,
public authService: AuthService,
public settingsService: SettingsService,
private translate: AlfrescoTranslationService) {
translate.addTranslationFolder('ng2-alfresco-login', 'node_modules/ng2-alfresco-login/src');