Skip to content

Commit

Permalink
fix: readme file is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanoy committed May 6, 2017
1 parent ab83bc8 commit e6d04a3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
## Demo
https://tanoy009.github.io/ng2-geoautocomplete/

## Test Case.
In Pipeline will be updated in a while.

## Table of contents

- [About](#about)
Expand Down Expand Up @@ -42,15 +45,24 @@ import { Ng2GeoautocompleteModule } from 'ng2-geoautocomplete';
})
export class MyModule {}
```
Add google place script in your main file generally referred to 'index.html' (Optional if you want to use google services).

```
<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>
```

Finally use in one of your apps components:
```typescript
import { Component } from '@angular/core';

@Component({
template: '<hello-world></hello-world>'
template: '<ng2geo-autocomplete (componentCallback)="autoCompleteCallback1($event)"></ng2geo-autocomplete>'
})
export class MyComponent {}
export class MyComponent {
autoCompleteCallback1(selectedData:any) {
//do any necessery stuff.
}
}
```

You may also find it useful to view the [demo source](https://github.com/tanoy009/ng2-geoautocomplete/blob/master/demo/demo.component.ts).
Expand Down
2 changes: 1 addition & 1 deletion demo/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
<div class="container-fluid container-demo">
<ng2geo-autocomplete-demoapp>Loading demo...</ng2geo-autocomplete-demoapp>
</div>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=true&libraries=places&language=en-US"></script>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=true&key=AIzaSyD7Pa0H7CnnyFI36ofI1aqKEPeTEsCl8Nk&libraries=places&language=en-US"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
<div class="container-fluid container-demo">
<ng2geo-autocomplete-demoapp>Loading demo...</ng2geo-autocomplete-demoapp>
</div>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=true&libraries=places&language=en-US"></script>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=true&key=AIzaSyD7Pa0H7CnnyFI36ofI1aqKEPeTEsCl8Nk&libraries=places&language=en-US"></script>
<script type="text/javascript" src="main-cede87693bce991731b8.js"></script></body>
</html>
2 changes: 1 addition & 1 deletion main-cede87693bce991731b8.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng2-geoautocomplete",
"version": "0.0.0",
"version": "0.0.1",
"description": "angular 2/4 compatable google autocomplete with server side api support and AOT enabled",
"main": "./bundles/ng2-geoautocomplete.umd.js",
"module": "./index.js",
Expand Down

0 comments on commit e6d04a3

Please sign in to comment.