Skip to content
This repository was archived by the owner on Oct 11, 2023. It is now read-only.

Commit d7276ff

Browse files
author
Mika Koskiola
committed
Moved the apiKey defining from the template to the controller
Edited the readme to fit the changes too
1 parent 717c872 commit d7276ff

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ It is a clean project without external dependencies!
1515

1616
## Configuring the project
1717

18-
1. go to the \www\app\templates\ folder and open up the results.html with your favorite editor
18+
1. go to the \www\app\controllers\ folder and open up the results.js with your favorite editor
1919
2. Edit the following line to include your Google API key:
2020

21-
```
22-
<div id="map" data-tap-disabled="true" google-map style="height:100%; width: 100%;" api-key="YOUR_API_KEY" events="events"></div>
21+
```javascript
22+
$scope.apiKey = 'YOUR_API_KEY_HERE';
2323
```
2424

2525
## Trying out the app

www/app/controllers/results.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ define([
1414
'eventService',
1515
function ($scope, $stateParams, $state, $timeout, $ionicHistory, eventService) {
1616
var first = true;
17+
$scope.apiKey = 'YOUR_API_KEY_HERE';
1718
$scope.limit = 10;
1819
$scope.show = {
1920
list: true

www/app/templates/results.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<button class="button button-clear icon" ng-disabled="loading" ng-class="{'ion-earth': show.list, 'ion-ios-list': !show.list}" ng-click="show.list = !show.list">
55
</button>
66
</ion-nav-buttons>
7-
<div id="map" data-tap-disabled="true" google-map style="height:100%; width: 100%;" api-key="AIzaSyB16sGmIekuGIvYOfNoW9T44377IU2d2Es" events="events"></div>
7+
<div id="map" data-tap-disabled="true" google-map style="height:100%; width: 100%;" api-key="{{apiKey}}" events="events"></div>
88
<ion-content ng-show="show.list" class="background-stable">
99
<ion-refresher on-refresh="reload()">
1010
</ion-refresher>

0 commit comments

Comments
 (0)