File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
import { Component , OnInit } from '@angular/core' ;
2
2
import { Appearance , GermanAddress , Location } from '@angular-material-extensions/google-maps-autocomplete' ;
3
3
import { Angulartics2GoogleAnalytics } from 'angulartics2/ga' ;
4
- import { UntypedFormControl , UntypedFormGroup } from '@angular/forms' ;
4
+ import { UntypedFormControl , UntypedFormGroup , Validators } from '@angular/forms' ;
5
5
import PlaceResult = google . maps . places . PlaceResult ;
6
6
7
7
@Component ( {
@@ -13,7 +13,7 @@ export class AppComponent implements OnInit {
13
13
14
14
title = 'google-maps-autocomplete' ;
15
15
16
- addressFC : UntypedFormControl = new UntypedFormControl ( 'Zollstock 34' ) ;
16
+ addressFC : UntypedFormControl = new UntypedFormControl ( null , [ Validators . required ] ) ;
17
17
addressFormGroup : UntypedFormGroup ;
18
18
19
19
public appearance = Appearance ;
@@ -72,10 +72,10 @@ export class AppComponent implements OnInit {
72
72
// address: new FormControl(),
73
73
} ) ;
74
74
75
- this . addressFormGroup
76
- . get ( 'address' )
77
- . valueChanges
78
- . subscribe ( value => console . log ( 'value changed' , value ) )
75
+ // this.addressFormGroup
76
+ // .get('address')
77
+ // .valueChanges
78
+ // .subscribe(value => console.log('value changed', value))
79
79
80
80
this . addressFC
81
81
. valueChanges
Original file line number Diff line number Diff line change 4
4
5
5
export const environment = {
6
6
production : false ,
7
- // GOOGLE_MAPS_API_KEY: 'AIzaSyBo7c5QYv-RWE1bgrtngHzQju_8lKBlIxs'
8
- GOOGLE_MAPS_API_KEY : 'AIzaSyD7FfGhQ3h8Q54zWzYl95R-FByAz-GAfLk'
7
+ GOOGLE_MAPS_API_KEY : ''
9
8
} ;
10
9
11
10
/*
You can’t perform that action at this time.
0 commit comments