Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiAddress: string = "";
- @Output() notify: EventEmitter<any> = new EventEmitter<any>();
- autoCompleteCallback1(selectedData: any) {
- this.apiAddress = selectedData.description;
- this.notify.emit(this.apiAddress);
- }
- import { Component, NgModule } from '@angular/core'; import {
- Ng4GeoautocompleteModule } from 'ng4-geoautocomplete';
- @NgModule({
- imports: [
- Ng4GeoautocompleteModule.forRoot()
- ]
- })
- export class MyModule{}
- <script type="text/javascript"
- src="https://maps.google.com/maps/api/js?sensor=true&key=XXReplace
- this with valid keyXX&libraries=places&language=en-US"></script>
- import { Component } from '@angular/core';
- @Component({ template: '<ng4geo-autocomplete
- (componentCallback)="autoCompleteCallback1($event)"></ng4geo-
- autocomplete>'
- })
- export class MyComponent {
- autoCompleteCallback1(selectedData:any) {
- //do any necessery stuff.
- }
- }
- public userSettings2: any = {
- showRecentSearch: false,
- geoCountryRestriction: ['in'],
- searchIconUrl: 'http://downloadicons.net/sites/default/files/identification-search-magnifying-glass-icon-73159.png'
- };
- <ng4geo-autocomplete [userSettings]="userSettings2" (componentCallback)="autoCompleteCallback2($event)"></ng4geo-autocomplete>
Add Comment
Please, Sign In to add comment