Skip to content

Commit 6b39c38

Browse files
author
Guy Brand
committed
Initial commit
1 parent 9dec66d commit 6b39c38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+557
-93792
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
/bower_components
21
node_modules
2+
bower_components
3+
npm-debug.log
4+
.idea
5+
*.iml

Gruntfile.js

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
'use strict';
2+
3+
module.exports = function (grunt) {
4+
5+
// load grunt tasks automatically
6+
require('load-grunt-tasks')(grunt);
7+
8+
// add time used for tasks statistics
9+
require('time-grunt')(grunt);
10+
11+
grunt.initConfig({
12+
pkg: grunt.file.readJSON("package.json"),
13+
"bower-install-simple": {
14+
options: {
15+
color: true
16+
},
17+
dev: {
18+
options: {
19+
production: false
20+
}
21+
}
22+
},
23+
concat: {
24+
js: {
25+
options: {
26+
banner: "(function() {\n\n'use strict';\n\n",
27+
footer: '\n})();',
28+
separator: '\n',
29+
process: true
30+
},
31+
src: 'src/ion-autocomplete.js',
32+
dest: 'dist/<%= pkg.name %>.js'
33+
34+
},
35+
css: {
36+
src: 'src/ion-autocomplete.css',
37+
dest: 'dist/<%= pkg.name %>.css'
38+
}
39+
},
40+
uglify: {
41+
options: {
42+
banner: "/*!\n * <%= pkg.name %> <%= pkg.version %>\n * Copyright <%= grunt.template.today('yyyy') %> Danny Povolotski \n * https://github.com/guylabs/ion-autocomplete\n */\n"
43+
},
44+
dist: {
45+
files: {
46+
'dist/<%= pkg.name %>.min.js': ['<%= concat.js.dest %>']
47+
}
48+
}
49+
},
50+
cssmin: {
51+
target: {
52+
files: [{
53+
expand: true,
54+
cwd: 'src',
55+
src: ['ion-autocomplete.css'],
56+
dest: 'dist',
57+
ext: '.min.css'
58+
}]
59+
}
60+
},
61+
karma: {
62+
unit: {
63+
configFile: 'karma.conf.js'
64+
},
65+
continuous: {
66+
configFile: 'karma.conf.js',
67+
singleRun: true
68+
}
69+
},
70+
coveralls: {
71+
options: {
72+
src: 'coverage-results/lcov.info',
73+
force: true
74+
},
75+
your_target: {
76+
src: 'coverage-results/extra-results-*.info'
77+
}
78+
}
79+
});
80+
81+
grunt.registerTask('build', ['bower-install-simple:dev', 'karma:continuous', 'concat', 'uglify', 'cssmin']);
82+
grunt.registerTask('test', ['karma:continuous']);
83+
grunt.registerTask('default', ['build']);
84+
85+
};

LICENSE

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 Danny Povolotski
3+
Copyright (c) 2015 Danny Povolotski
4+
Copyright (c) 2015 Modifications by Guy Brand
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

README.md

+27-15
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,44 @@
1-
ion-google-place
1+
ion-autocomplete
22
================
33

4-
Ionic directive for a location dropdown that utilizes google maps
4+
Configurable Ionic directive for an autocomplete dropdown.
55

6-
![Animated demo](https://github.com/israelidanny/ion-google-place/raw/master/demo.gif)
6+
![Animated demo](https://github.com/guylabs/ion-autocomplete/raw/master/demo.gif)
77

88
This is a simple directive for an autocomplete overlay location field built for Ionic Framework.
99

1010
#Installation
1111

12-
Installation should be dead simple, you can grab a copy from bower:
12+
1. Use bower to install the new module:
1313
```bash
14-
bower install ion-google-place
14+
bower install ion-autocomplete
1515
```
16-
17-
Or clone this repository.
18-
19-
For the geolocation service to work, you'll need to have Google Maps javascript API somewhere in your HEAD tag:
20-
`<script src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script>`
21-
22-
You'll need to add `ion-google-place` as a dependency on your Ionic app:
16+
2. Import the `ion-autocomplete` javascript and css file into your HTML file:
17+
```html
18+
<script src="bower_components/ion-autocomplete/dist/ion-autocomplete.js"></script>
19+
<link href="bower_components/ion-autocomplete/dist/ion-autocomplete.css" rel="stylesheet">
20+
```
21+
3. Add `ion-autocomplete` as a dependency on your Ionic app:
2322
```javascript
2423
angular.module('myApp', [
2524
'ionic',
26-
'ion-google-place'
25+
'ion-autocomplete'
2726
]);
2827
```
28+
#Usage
29+
30+
To use the `ion-autocomplete` directive you need to add the following snippet:
31+
`<ion-autocomplete ng-model="model" placeholder="Enter the query to search for ..." />`
32+
33+
## Acknowledgements
34+
35+
When I first searched for an Ionic autocomplete component I just found the project of Danny. So please have a look at
36+
his [ion-google-place](https://github.com/israelidanny/ion-google-place) project as this project here is a fork of it.
37+
At this point I want to thank him for his nice work.
38+
39+
## License
2940

30-
That's pretty much it. Now you can use the directive like so:
31-
`<ion-google-place placeholder="Enter an address, Apt# and ZIP" ng-model="location" />`
41+
This Ionic autocomplete directive is available under the MIT license.
3242

43+
(c) Danny Povolotski
44+
(c) Modifications by Guy Brand

bower.json

+33-18
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,40 @@
11
{
2-
"name": "ion-google-place",
2+
"name": "ion-autocomplete",
33
"version": "0.0.1",
4-
"homepage": "https://github.com/israelidanny/ion-google-place",
5-
"authors": [
6-
"Danny Povolotski <[email protected]>"
7-
],
8-
"description": "Ionic directive for a location field (using google maps geocoding)",
9-
"main": "ion-google-place.js",
10-
"keywords": [
11-
"ionic",
12-
"maps",
13-
"locations",
14-
"dropdown",
15-
"autocomplete"
16-
],
4+
"description": "A configurable Ionic directive for an autocomplete dropdown",
5+
"main": "./dist/ion-autocomplete.js",
176
"license": "MIT",
187
"ignore": [
198
"**/.*",
20-
"node_modules",
21-
"bower_components",
9+
".gitignore",
10+
"Gruntfile.js",
11+
"karma.conf.js",
12+
"lib",
13+
"src",
2214
"test",
23-
"tests"
24-
]
15+
"node_modules",
16+
"bower_components"
17+
],
18+
"keywords": [
19+
"AngularJS",
20+
"angular",
21+
"Ionic",
22+
"ion",
23+
"autocomplete"
24+
],
25+
"authors": [
26+
"Danny Povolotski <[email protected]>",
27+
"Guy Brand <[email protected]>"
28+
],
29+
"homepage": "https://github.com/guylabs/ion-autocomplete",
30+
"repository": {
31+
"type": "git",
32+
"url": "https://github.com/guylabs/ion-autocomplete.git"
33+
},
34+
"dependencies": {
35+
"ionic": "driftyco/ionic-bower#1.0.0-beta.14"
36+
},
37+
"devDependencies": {
38+
"angular-mocks": "~1.3.0"
39+
}
2540
}

ion-google-place.js

-124
This file was deleted.

0 commit comments

Comments
 (0)