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

Commit

Permalink
Moved the apiKey defining from the template to the controller
Browse files Browse the repository at this point in the history
Edited the readme to fit the changes too
  • Loading branch information
Mika Koskiola committed Apr 29, 2016
1 parent 717c872 commit d7276ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ It is a clean project without external dependencies!

## Configuring the project

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

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

## Trying out the app
Expand Down
1 change: 1 addition & 0 deletions www/app/controllers/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ define([
'eventService',
function ($scope, $stateParams, $state, $timeout, $ionicHistory, eventService) {
var first = true;
$scope.apiKey = 'YOUR_API_KEY_HERE';
$scope.limit = 10;
$scope.show = {
list: true
Expand Down
2 changes: 1 addition & 1 deletion www/app/templates/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<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">
</button>
</ion-nav-buttons>
<div id="map" data-tap-disabled="true" google-map style="height:100%; width: 100%;" api-key="AIzaSyB16sGmIekuGIvYOfNoW9T44377IU2d2Es" events="events"></div>
<div id="map" data-tap-disabled="true" google-map style="height:100%; width: 100%;" api-key="{{apiKey}}" events="events"></div>
<ion-content ng-show="show.list" class="background-stable">
<ion-refresher on-refresh="reload()">
</ion-refresher>
Expand Down

0 comments on commit d7276ff

Please sign in to comment.