Skip to content

Commit

Permalink
Step 16.4: Create component
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela authored and DAB0mB committed Dec 14, 2016
1 parent b323077 commit 55c0734
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions imports/ui/components/partyMap/partyMap.js
@@ -0,0 +1,44 @@
import angular from 'angular';
import angularMeteor from 'angular-meteor';
import 'angular-simple-logger';
import 'angular-google-maps';

import template from './partyMap.html';

class PartyMap {
constructor($scope) {
'ngInject';

this.map = {
center: {
latitude: 45,
longitude: -73
},
zoom: 8,
events: {}
};

this.marker = {
options: {
draggable: true
},
events: {}
};
}
}

const name = 'partyMap';

// create a module
export default angular.module(name, [
angularMeteor,
'nemLogging', // https://github.com/angular-ui/angular-google-maps/issues/1633
'uiGmapgoogle-maps'
]).component(name, {
template,
controllerAs: name,
bindings: {
location: '='
},
controller: PartyMap
});

0 comments on commit 55c0734

Please sign in to comment.