...
 
Commits (2)
......@@ -16,11 +16,13 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/geoportal-frontend",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"preserveSymlinks": true,
"assets": [
"src/favicon.ico",
"src/assets"
......
This diff is collapsed.
......@@ -11,55 +11,57 @@
},
"private": true,
"dependencies": {
"@angular-devkit/core": "^0.6.8",
"@angular-devkit/schematics": "^0.6.8",
"@angular/animations": "^7.2.15",
"@angular/common": "^7.2.15",
"@angular/compiler": "^7.2.15",
"@angular/core": "^7.2.15",
"@angular/forms": "^7.2.15",
"@angular/http": "^7.2.15",
"@angular/platform-browser": "^7.2.15",
"@angular/platform-browser-dynamic": "^7.2.15",
"@angular/router": "^7.2.15",
"@ng-bootstrap/ng-bootstrap": "^4.2.1",
"@angular-devkit/core": "^8.3.24",
"@angular-devkit/schematics": "^8.3.24",
"@angular/animations": "^8.2.14",
"@angular/common": "^8.2.14",
"@angular/compiler": "^8.2.14",
"@angular/core": "^8.2.14",
"@angular/forms": "^8.2.14",
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "^8.2.14",
"@ng-bootstrap/ng-bootstrap": "^5.2.1",
"@types/openlayers": "^4.6.17",
"ajv": "^6.11.0",
"angular-font-awesome": "^3.1.2",
"boostrap": "^2.0.0",
"core-js": "^2.6.9",
"core-js": "^3.6.4",
"font-awesome": "^4.7.0",
"ngx-markdown": "^7.1.5",
"npm": "^6.9.0",
"ol": "^5.3.3",
"rxjs": "^6.5.2",
"tooltip.js": "^1.3.2",
"jquery": "^3.4.1",
"ng-bootstrap": "^1.6.3",
"ngx-markdown": "^8.2.2",
"npm": "^6.13.7",
"ol": "^6.1.1",
"rxjs": "^6.5.4",
"tooltip.js": "^1.3.3",
"tslib": "^1.10.0",
"zone.js": "~0.8.29"
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.12.4",
"@angular/cli": "^7.3.9",
"@angular/compiler-cli": "^7.2.15",
"@angular/language-service": "^7.2.15",
"@types/jasmine": "^2.8.16",
"@types/jasminewd2": "^2.0.6",
"@types/node": "~8.9.4",
"angular-ide": "^0.9.63",
"angular-notifier": "^4.1.1",
"bootstrap": "^4.3.1",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"@angular-devkit/build-angular": "^0.803.24",
"@angular/cli": "^8.3.24",
"@angular/compiler-cli": "^8.2.14",
"@angular/language-service": "^8.2.14",
"@types/jasmine": "^3.5.2",
"@types/jasminewd2": "^2.0.8",
"@types/node": "~13.5.3",
"angular-ide": "^0.9.72",
"angular-notifier": "^6.0.1",
"bootstrap": "^4.4.1",
"codelyzer": "~5.2.1",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"ngx-spinner": "^7.1.4",
"protractor": "^5.4.2",
"sass": "^1.21.0",
"ts-node": "~5.0.1",
"tslint": "~5.12.1",
"typescript": "^3.2.4"
"karma": "~4.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-jasmine": "~3.1.0",
"karma-jasmine-html-reporter": "^1.5.1",
"ngx-spinner": "^8.1.0",
"protractor": "^5.4.3",
"sass": "^1.25.0",
"ts-node": "~8.6.2",
"tslint": "^5.20.1",
"typescript": "^3.5.3"
}
}
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { LOCALE_ID, NgModule, enableProdMode } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MarkdownModule } from 'ngx-markdown';
......@@ -147,6 +148,7 @@ enableProdMode();
AppRoutingModule,
NgbModule,
NgxSpinnerModule,
BrowserAnimationsModule,
NotifierModule,
MarkdownModule.forRoot()
],
......@@ -159,6 +161,8 @@ enableProdMode();
TermsofuseComponent,
NetworkpartnersearchComponent,
AddsomethingComponent,
AuthComponent,
LoginComponent,
],
providers: [
LogService,
......
......@@ -22,7 +22,7 @@ export class AuthComponent implements OnInit {
private message: string;
private sending: boolean;
private loginForm: FormGroup;
private oauth = false;
public oauth = false;
constructor(
private logger: LogService,
private authService: AuthService,
......@@ -63,7 +63,7 @@ export class AuthComponent implements OnInit {
this.authService.onLoggedIn.subscribe(
(isLoggedIn)=>{
if(isLoggedIn){
if(this.asModal){
if(true/*this.asModal*/){
setTimeout(
()=>{
console.log("params:"+JSON.stringify(this.routeParams,null,3));
......
......@@ -13,7 +13,7 @@ import { GeoportalApiService } from '../services/geoportal-api.service';
})
export class MenubarComponent implements OnInit {
constructor(private authService: AuthService, private apiService: GeoportalApiService, private logger:LogService,private modalService: ModalManagerService, private router:Router) {
constructor(public authService: AuthService, private apiService: GeoportalApiService, private logger:LogService,private modalService: ModalManagerService, private router:Router) {
}
......
<form [formGroup]="composemessageForm" (ngSubmit)="compose()">
<!--<form [formGroup]="composemessageForm" (ngSubmit)="compose()">
<div class="modal">
<div class="modal-header">
<button type="button" ng-click="closePopup()" class="close">×</button>
......@@ -12,7 +12,7 @@
</div>
</div>
<div class="form-group">
<input type="text" placeholder="Betreff" class="form-control" [ngClass]="" style="width:95%;" formControlName="messagesubj"><br />
<input type="text" placeholder="Betreff" class="form-control" style="width:95%;" formControlName="messagesubj"><br />
</div>
<textarea style="width:95%;" rows="10"></textarea>
</div>
......@@ -21,4 +21,7 @@
<a href="#" class="btn btn-primary" ng-click="sendEmail()">Absenden</a>
</div>
</div>
</form>
\ No newline at end of file
</form>-->
<div>
NYI
</div>
\ No newline at end of file
......@@ -38,7 +38,7 @@ export class BliDimensionFactory{
return false;
}
console.log("Pushing to array: " +dim.name+"/"+dim.id);
//console.log("Pushing to array: " +dim.name+"/"+dim.id);
BliDimensionFactory.dimensions.push(dim);
return true;
}
......@@ -63,7 +63,7 @@ export class BliDimensionFactory{
let existing = BliDimensionFactory.get(data);
if(existing === undefined){
let newDim = new BliDimension(data);
console.log("Creating new dimension: "+JSON.stringify(data));
//console.log("Creating new dimension: "+JSON.stringify(data));
BliDimensionFactory.add(newDim);
return newDim;
}else{
......
<div class="form-check">
<input *ngFor="let dimension of dimensions" class="form-check-input" type="checkbox" value="" id="{{dimension.name}}">
<label class="form-check-label" title="{{dimension.description}}" for="{{dimension.name}}">
<i [ngClass]="bliService.getIcon(dimension.name)"></i>
{{dimension.name}} <a *ngIf="authService.profileRetrieved && authService.currentUser.isAdmin"> [e]</a>
<div>NYI/TODO</div>
<!--<div class="form-check">
<input *ngFor="let dimension:BliDimension of dimensions" class="form-check-input" type="checkbox" value="" id="{{dimension.name}}">
<label class="form-check-label" title="{{dimension.description}}" for="{{dimension.name}}">
<i [ngClass]="bliService.getIcon(dimension.name)"></i>
{{dimension.name}} <a *ngIf="authService.profileRetrieved && authService.currentUser.isAdmin"> [e]</a>
</label>
</div>
\ No newline at end of file
</div>-->
\ No newline at end of file
......@@ -15,7 +15,7 @@ export class BliCheckComponent implements OnInit {
constructor(
private logger: LogService,
private bliService: BliService,
private authService: AuthService) {
public authService: AuthService) {
this.dimensions = bliService.dimensions;
}
......
......@@ -115,16 +115,16 @@ export class CreateEntryComponent implements OnInit {
constructor(
private formBuilder: FormBuilder,
private router: Router,
private logger: LogService,
private apiService: GeoportalApiService,
private authService: AuthService,
private overpass: OverpassService,
private cache: CacheService,
private bliService: BliService,
private categoryService: CategoryService,
private nodeService: OsmNodeService
public formBuilder: FormBuilder,
public router: Router,
public logger: LogService,
public apiService: GeoportalApiService,
public authService: AuthService,
public overpass: OverpassService,
public cache: CacheService,
public bliService: BliService,
public categoryService: CategoryService,
public nodeService: OsmNodeService
) {
this.logger.debug("createEntryComponent: constructing createEntry");
......
......@@ -21,11 +21,11 @@ export class RegisterComponent implements OnInit {
shoForm = true;
message: string;
constructor(
private formBuilder: FormBuilder,
private router: Router,
private logger: LogService,
private apiService: GeoportalApiService,
private authService: AuthService
public formBuilder: FormBuilder,
public router: Router,
public logger: LogService,
public apiService: GeoportalApiService,
public authService: AuthService
) { }
ngOnInit() {
......
......@@ -55,7 +55,7 @@ export class SearchComponent implements OnInit {
private routeParams:any = null;
constructor(
private nodeService : OsmNodeService,
public nodeService : OsmNodeService,
private formBuilder : FormBuilder,
private logger : LogService,
private apiService : GeoportalApiService,
......
......@@ -154,6 +154,8 @@ private handleTokenLoginResponse(response: any, saveLogin: boolean,token:string)
this.currentUser.setOAuthToken(token);
this.apiService.setBearer(this.bearer);
this.apiService.saveBearer();
this.apiService.getCurrentUser().subscribe(
res => {
this.handleUserResponse(res);
......@@ -162,7 +164,7 @@ private handleTokenLoginResponse(response: any, saveLogin: boolean,token:string)
);
}
private handleUserResponse(response: any){
console.log("Userdata:" + JSON.stringify(response, null, 3));
//console.log("Userdata:" + JSON.stringify(response, null, 3));
this.currentUser.setData(response);
this.logger.debug(this.currentUser.toString());
......
......@@ -11,7 +11,9 @@ export class CacheService {
expiration = 30;
useLocalStorage = true;
data : Array<CacheItem> = new Array<CacheItem>();
constructor() {
constructor(
private logger: LogService
) {
console.log("Constructing CacheService.");
let storageJSON = JSON.stringify([]);
......@@ -21,7 +23,9 @@ export class CacheService {
try{
storageJSON=localStorage.getItem('CacheService.data');
}catch(e){
console.log("Caught exception.");
console.warn("Caught exception. Disabling cache.");
setTimeout(()=>{this.logger.notify("error","localStorage not available. Cache will not be persistent.")},3500);
this.useLocalStorage = false;
}
}else{
......
......@@ -18,6 +18,7 @@ export class CategoryService {
this.logger.debug("CategoryService: instantiating.");
this.categories = new Array<Category>();
this.readCategories();
this.logger.debug("instantiated.");
}
readCategories(){
......
......@@ -133,7 +133,6 @@ export class GeoportalApiService {
loginWithToken(token: string): Observable<any> {
let tokenWrap = new KeyValuePair({"key":"token","value":token});
this.logger.debug('geoportalApiService.loginWithToken();');
console.log("Sending: "+tokenWrap.key+"/"+tokenWrap.value);
let post = this.http.post<User>(
......@@ -264,7 +263,7 @@ export class GeoportalApiService {
public searchGeoElements(pattern: string) {
let params = new HttpParams();
params.set('q', pattern);
console.log(params.toString());
console.log("Searching for: "+params.toString());
//?q='+encodeURI(pattern)
return this.http.get(this.apiURL + '/search/?q=' + encodeURI(pattern), this.httpOptions);
}
......
import { Injectable,ComponentFactoryResolver, ViewContainerRef, ComponentFactory } from '@angular/core';
import { Injectable, ComponentFactoryResolver, ViewContainerRef, ComponentFactory } from '@angular/core';
import { NgbModal, NgbModalConfig, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Subject, isObservable } from 'rxjs';
......@@ -33,7 +33,9 @@ export class ModalManagerService {
onClose = new Subject<boolean>();
onOpen = new Subject<boolean>();
registerViewContainer(view:any){
console.log("registering view container ref.");
if(!view){
console.warn("ViewContainer is null");
}
this.viewContainerRef = view;
}
......@@ -81,21 +83,23 @@ export class ModalManagerService {
removeComponent(){
if(this.reference){
if(this.reference != undefined){
this.reference.destroy();
}
this.viewContainerRef.clear();
if(this.viewContainerRef != undefined){
this.viewContainerRef.clear();
}
}
configureComponent(comp: string){
let component = this.resolveComponent(comp);
if(component === null){
console.log("Cannot resolve component: "+comp);
console.warn("Cannot resolve component: "+comp);
return null;
}
if(this.viewContainerRef == null || this.viewContainerRef == undefined){
console.log("ViewContainerRef is undefined/null");
console.warn("ViewContainerRef is undefined/null");
return null;
}
return component;
......@@ -105,7 +109,7 @@ export class ModalManagerService {
open(_comp:any, dismissable?: boolean,options?: any,data?:any){
this.close();
let comp = this.configureComponent(this.resolveComponent(_comp));
if(comp === null){
comp=_comp;
......@@ -126,22 +130,33 @@ export class ModalManagerService {
this.modalConfig['backdrop']=true;
this.modalConfig['keyboard']=true;
this.modalConfig['beforeDismiss']=()=>this.onDismiss.next(true);
//this.modalConfig['beforeDismiss']=(){this.onDismiss.next(true);});
/*
this.modalConfig['beforeDismiss']=()=>{
this.onDismiss.next(true);
return new Promise<boolean>(
(resolve,reject)=>{return resolve(true);}
)
};*/
this.modalConfig['beforeDismiss']=()=>new Promise<boolean>((resolve,reject)=>{this.onDismiss.next(true);resolve(true);})
this.modalRef = this.modalService.open(comp,this.modalConfig);
this.modalRef.onDismiss
this.modalRef.componentInstance.asModal = true;
//this.modalRef.onDismiss
let ci = this.modalRef.componentInstance;
ci.asModal = true;
if(data){
for(let key in data){
this.modalRef.componentInstance[key]=data[key];
ci[key]=data[key];
}
}
if(typeof this.modalRef.componentInstance['close'] == "function" && isObservable(this.modalRef.componentInstance['close'])){
this.subscription$=this.modalRef.componentInstance['close'].subscribe(
(event)=>{
this.close();
}
)
if(typeof ci['close'] == "function" && isObservable(ci['close'])){
this.subscription$=ci['close'].subscribe(
(event)=>{
this.close();
}
)
}
this.onOpen.next(true);
}
subscription$:any;
......
......@@ -34,7 +34,7 @@ export class OsmNodeService {
private cache: CacheService,
private bliService: BliService,
private categoryService: CategoryService,
private nodeService: OsmNodeService,
//private nodeService: OsmNodeService,
private geoElementService: GeoElementService) {
this.result = new Array<OsmNode>();
this.dimensions = bliService.dimensions;
......
......@@ -8,7 +8,7 @@ import { AuthService } from '../../services/auth.service';
})
export class UserComponent implements OnInit {
constructor(private authService: AuthService) {
constructor(public authService: AuthService) {
authService.currentUser;
}
......
......@@ -15,9 +15,9 @@ export class UserprofilComponent implements OnInit {
false;
constructor(
private router:Router,
private authService: AuthService,
private logger: LogService
public router:Router,
public authService: AuthService,
public logger: LogService
) {
this.logger.debug("Constructing UserProfilComponent.");
this.currentUser = this.authService.currentUser;
......
......@@ -11,7 +11,7 @@ import { BliDimension } from '../../models/BliDimension';
export class ElementFilterComponent implements OnInit {
dimensions:Array<BliDimension>;
constructor(private bliService : BliService, private mapService: MapService) {
constructor(public bliService : BliService, public mapService: MapService) {
this.dimensions = new Array<BliDimension>();
}
......
......@@ -19,9 +19,14 @@ export class CategoryComponent implements OnInit {
categories : Array<Category>;
sharingCollapsed = true;
sustCollapsed = true;
constructor(private apiService: GeoportalApiService, private logger: LogService, private authService: AuthService, private cache: CacheService) {
public sustCollapsed = true;
public sharingOffersFocus = false;
public sharingOrganisatorFocus = false;
public sharingFreeOffersFocus = false;
public sharingNonFreeOffersFocus = false;
public sustainableNutritionFocus = false;
public sustainableNutritionAssortmentFocus = false;
constructor(public apiService: GeoportalApiService, public logger: LogService, public authService: AuthService, public cache: CacheService) {
this.categories = new Array<Category>();
}
ngOnInit() {
......
......@@ -34,14 +34,14 @@ export class CreateComponent implements OnInit {
id: number;
form: FormGroup;
constructor(
private nodeService: OsmNodeService,
private overpass: OverpassService,
private router: Router,
private route: ActivatedRoute,
private api: GeoportalApiService,
private logger: LogService,
private authService: AuthService,
private formBuilder: FormBuilder
public nodeService: OsmNodeService,
public overpass: OverpassService,
public router: Router,
public route: ActivatedRoute,
public api: GeoportalApiService,
public logger: LogService,
public authService: AuthService,
public formBuilder: FormBuilder
) {
}
......
......@@ -15,6 +15,7 @@ import { LogService } from '../../../services/log.service';
import { GeoportalApiService } from '../../../services/geoportal-api.service';
import { AuthService } from '../../../services/auth.service';
import { BliService } from '../../../services/bli.service';
import { MapService } from '../../../services/map.service';
import { Observable ,throwError } from 'rxjs';
import { OverpassService } from '../../../services/overpass.service';
import { CacheService } from '../../../services/cache.service';
......@@ -29,7 +30,7 @@ import { isArray } from 'util';
export class EditComponent implements OnInit {
sharingCollapsed = true;
descCollapsed = true;
descCollapsed = false;
node : OsmNode;
id:number;
form: FormGroup;
......@@ -41,7 +42,8 @@ export class EditComponent implements OnInit {
private api: GeoportalApiService,
private logger: LogService,
private authService: AuthService,
private formBuilder: FormBuilder
private formBuilder: FormBuilder,
private mapService: MapService
) {
}
......@@ -57,7 +59,7 @@ export class EditComponent implements OnInit {
description:[this.node.getDescription()],
}),
networkpartnerForm:this.formBuilder.group({
welfare:[this.node.getTagValue('_gpd:welfare')],
welfare:[this.node.getTagValue('_gpd:welfare')||''],
aktionsradius:[this.node.getTagValue('_gpd:aktionsradius')],
aktionsradiusQuelle:[this.node.getTagValue('_gpd:aktionsradiusQuelle')],
}),
......@@ -142,6 +144,7 @@ export class EditComponent implements OnInit {
this.logger.notify('success','Gespeichert: '+this.node.getId());
}else{
this.logger.notify('success','Gespeichert.');
this.mapService.rerender();
}
},
(error)=>{
......@@ -151,6 +154,7 @@ export class EditComponent implements OnInit {
}
ngOnInit() {
this.loadElement();
this.setupFormGroup();
}
loadElement(){
this.logger.debug("Loading element..."),
......@@ -173,7 +177,6 @@ export class EditComponent implements OnInit {
this.node = OsmNodeFactory.create(data);
this.overpass.getOsmTags(this.node);
this.logger.debug(this.node.debugString());
this.setupFormGroup();
},
(error)=>{
this.logger.debug("Error fetching node "+this.id);
......@@ -186,8 +189,6 @@ export class EditComponent implements OnInit {
this.logger.debug("Element:");
this.logger.debug(this.node.debugString());
this.overpass.getOsmTags(this.node);
this.setupFormGroup();
}
});
......
......@@ -10,6 +10,7 @@ import { FormsModule ,FormBuilder, ReactiveFormsModule, FormGroup, Validators }
export class GoodplaceComponent implements OnInit {
@Input('node') node : OsmNode;
@Input('form') form : FormGroup;
public infoCollapsed:boolean=true;
constructor() { }
ngOnInit() {
......
......@@ -44,20 +44,21 @@
<option>Ja</option>
<option>Nein</option>
</select>-->
<div class="form-check form-check-inline col">
<input class="form-check-input" formControlName="welfare" type="radio" value="Keine Angabe">
<label class="form-check-label" for="inlineRadio1">Keine Angabe</label>
</div>
<div class="form-check form-check-inline col" >
<input class="form-check-input" formControlName="welfare" type="radio" value="Ja">
<label class="form-check-label" for="inlineRadio2">Ja</label>
</div>
<div class="form-check form-check-inline col" formControlName="welfare">
<input class="form-check-input" formControlName="welfare" type="radio" value="Nein">
<label class="form-check-label" for="inlineRadio3">Nein</label>
</div>
</div>
<div class="form-check form-check-inline col">
<input class="form-check-input" formControlName="welfare" type="radio" value="Keine Angabe">
<label class="form-check-label" for="inlineRadio1">Keine Angabe</label>
</div>
<div class="form-check form-check-inline col" >
<input class="form-check-input" formControlName="welfare" type="radio" value="Ja">
<label class="form-check-label" for="inlineRadio2">Ja</label>
</div>
<div class="form-check form-check-inline col">
<input class="form-check-input" formControlName="welfare" type="radio" value="Nein">
<label class="form-check-label" for="inlineRadio3">Nein</label>
</div>
</div>
</div>
<div class="form-group">
......@@ -88,7 +89,7 @@
<i class="fa fa-map-marker"
aria-hidden="true">&nbsp;</i><span>{{partner.name}}</span>
<button type="submit" class="btn btn-secondary btn-sm create-entry-tag"
(click)="node.removePeer(partner)">Entfernen</button>
(click)="node.removePeer(partner);partner.removePeer(node);">Entfernen</button>
</div>
</div>
......
......@@ -11,16 +11,16 @@ import { FormsModule, FormBuilder, ReactiveFormsModule, FormGroup, Validators }
export class NetworkpartnerComponent implements OnInit {
@Input('node') node: OsmNode;
@Input('form') form: FormGroup;
public descCollapsed:boolean=true;
public aktionsQuelleFocus:boolean=false;
constructor(
private modalService: ModalManagerService
) { }
ngOnInit() {
}
logMe(){
console.log("yeeT");
if(this.form){
console.log("Have form in networkpartner.");
console.log(this.form.get('welfare'));
}
}
}
......@@ -10,7 +10,7 @@ export class OsminformationComponent implements OnInit {
@Input('node') node : OsmNode;
@Input('form') form : FormGroup;
public infoCollapsed:boolean=false ;
constructor() { }
ngOnInit() {
......
......@@ -5,6 +5,7 @@ import { ModalManagerService } from '../../../services/modal-manager.service';
import { AuthService } from '../../../services/auth.service';
import { GeoportalApiService } from '../../../services/geoportal-api.service';
import { Router } from '@angular/router';
import { LogService } from '../../../services/log.service';
@Component({
selector: 'app-login',
//templateUrl: './login.component.html',
......@@ -19,10 +20,12 @@ export class LoginComponent implements OnInit {
private modalManager: ModalManagerService,
private authService: AuthService,
private router : Router,
private apiService: GeoportalApiService
private apiService: GeoportalApiService,
private logger:LogService
) { }
ngOnInit() {
this.modalManager.open('AuthComponent');
}
......
......@@ -17,7 +17,7 @@ import { EditsourceComponent } from '../../../widgets/modals/editsource/editsour
styleUrls: ['./modal.component.css']
})
export class ModalComponent implements OnInit {
@ViewChild('content',{ read: ViewContainerRef} ) viewContainerRef: ViewContainerRef;
@ViewChild('content',{ read: ViewContainerRef,static:true} ) viewContainerRef: ViewContainerRef;
//@ViewChild('templateRef') templateRef: TemplateRef<any>;
modalOpened$:any;
......
......@@ -63,5 +63,5 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" (click)="close.emit(true)">Auswahl hinzufügen</button>
<button type="button" class="btn btn-primary" (click)="this.close();">Auswahl hinzufügen</button>
</div>
\ No newline at end of file
......@@ -18,13 +18,14 @@ import { OsmNodeFactory } from '../../../models/OsmNodeFactory';
export class NetworkpartnersearchComponent implements OnInit {
@Input() node:OsmNode;
@Input() asModal: boolean;
@Output() close:EventEmitter<boolean> = new EventEmitter<boolean>();
@Output() closeModal:EventEmitter<boolean> = new EventEmitter<boolean>();
searchPattern:FormControl;
constructor(
private logger: LogService,
private nominatimService:NominatimService,
private apiService:GeoportalApiService,
private nodeService:OsmNodeService
private nodeService:OsmNodeService,
private modalService:ModalManagerService,
) {
this.searchPattern = new FormControl('');
}
......@@ -74,5 +75,7 @@ export class NetworkpartnersearchComponent implements OnInit {
ngOnInit() {
this.geoportalResultNodes= new Array<OsmNode>();
}
close(){
this.modalService.close('Cross click');
}
}
......@@ -4,8 +4,15 @@
"outDir": "../out-tsc/app",
"types": []
},
"files": [
"main.ts",
"polyfills.ts"
],
"angularCompilerOptions": {
"enableIvy": true
},
"exclude": [
"test.ts",
"**/*.spec.ts"
"**/*.spec.ts",
]
}
{
"compileOnSave": false,
"compileOnSave": true,
"compilerOptions": {
"baseUrl": "./",
"importHelpers": true,
......