54472: Intermediate commit

This commit is contained in:
Kristof De Langhe
2018-08-10 15:05:22 +02:00
parent aa73e874a5
commit 79a3788b3b
4 changed files with 40 additions and 6 deletions

View File

@@ -1,5 +1,8 @@
import { Component } from '@angular/core';
import { Community } from '../../core/shared/community.model';
import { ComColDataService } from '../../core/data/comcol-data.service';
import { NormalizedCommunity } from '../../core/cache/models/normalized-community.model';
import { CommunityDataService } from '../../core/data/community-data.service';
@Component({
selector: 'ds-create-community',
@@ -8,10 +11,15 @@ import { Community } from '../../core/shared/community.model';
})
export class CreateCommunityPageComponent {
public constructor(private communityDataService: CommunityDataService) {
}
onSubmit(data: any) {
Object.assign(new Community(), {
// TODO: Create community object to add to rest
const community = Object.assign(new Community(), {
name: data.name
});
this.communityDataService.create(community);
}
}