DS249: Fix to typedoc and angular 6 fix

This commit is contained in:
Yana De Pauw
2018-12-19 10:37:18 +01:00
parent 2c78f98097
commit 12d49e010d
2 changed files with 7 additions and 6 deletions

View File

@@ -3,15 +3,14 @@ import {TranslateModule} from '@ngx-translate/core';
import {NO_ERRORS_SCHEMA} from '@angular/core'; import {NO_ERRORS_SCHEMA} from '@angular/core';
import {CommunityPageSubCommunityListComponent} from './community-page-sub-community-list.component'; import {CommunityPageSubCommunityListComponent} from './community-page-sub-community-list.component';
import {Community} from '../../core/shared/community.model'; import {Community} from '../../core/shared/community.model';
import {Observable} from 'rxjs/Observable';
import {RemoteData} from '../../core/data/remote-data'; import {RemoteData} from '../../core/data/remote-data';
import {PaginatedList} from '../../core/data/paginated-list'; import {PaginatedList} from '../../core/data/paginated-list';
import 'rxjs/add/observable/of';
import {PageInfo} from '../../core/shared/page-info.model'; import {PageInfo} from '../../core/shared/page-info.model';
import {SharedModule} from '../../shared/shared.module'; import {SharedModule} from '../../shared/shared.module';
import {RouterTestingModule} from '@angular/router/testing'; import {RouterTestingModule} from '@angular/router/testing';
import {NoopAnimationsModule} from '@angular/platform-browser/animations'; import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {By} from '@angular/platform-browser'; import {By} from '@angular/platform-browser';
import {of as observableOf, Observable } from 'rxjs';
describe('SubCommunityList Component', () => { describe('SubCommunityList Component', () => {
let comp: CommunityPageSubCommunityListComponent; let comp: CommunityPageSubCommunityListComponent;
@@ -46,7 +45,7 @@ describe('SubCommunityList Component', () => {
language: 'en_US', language: 'en_US',
value: 'Test title' value: 'Test title'
}], }],
subcommunities: Observable.of(new RemoteData(true, true, true, subcommunities: observableOf(new RemoteData(true, true, true,
undefined, new PaginatedList(new PageInfo(), []))) undefined, new PaginatedList(new PageInfo(), [])))
}); });
@@ -57,7 +56,7 @@ describe('SubCommunityList Component', () => {
language: 'en_US', language: 'en_US',
value: 'Test title' value: 'Test title'
}], }],
subcommunities: Observable.of(new RemoteData(true, true, true, subcommunities: observableOf(new RemoteData(true, true, true,
undefined, new PaginatedList(new PageInfo(), subcommunities))) undefined, new PaginatedList(new PageInfo(), subcommunities)))
}) })
; ;

View File

@@ -1,11 +1,11 @@
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { RemoteData } from '../../core/data/remote-data'; import { RemoteData } from '../../core/data/remote-data';
import { Community } from '../../core/shared/community.model'; import { Community } from '../../core/shared/community.model';
import { fadeIn } from '../../shared/animations/fade'; import { fadeIn } from '../../shared/animations/fade';
import { PaginatedList } from '../../core/data/paginated-list'; import { PaginatedList } from '../../core/data/paginated-list';
import {Observable} from 'rxjs';
@Component({ @Component({
selector: 'ds-community-page-sub-community-list', selector: 'ds-community-page-sub-community-list',
@@ -13,7 +13,9 @@ import { PaginatedList } from '../../core/data/paginated-list';
templateUrl: './community-page-sub-community-list.component.html', templateUrl: './community-page-sub-community-list.component.html',
animations:[fadeIn] animations:[fadeIn]
}) })
/**
* Component to render the sub-communities of a Community
*/
export class CommunityPageSubCommunityListComponent implements OnInit { export class CommunityPageSubCommunityListComponent implements OnInit {
@Input() community: Community; @Input() community: Community;
subCommunitiesRDObs: Observable<RemoteData<PaginatedList<Community>>>; subCommunitiesRDObs: Observable<RemoteData<PaginatedList<Community>>>;