Skip to content

Commit a6a55ab

Browse files
author
Faris Chebib
committed
updated initial meetup controller
1 parent 138e6fc commit a6a55ab

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

Diff for: _includes/meetuptmpl.html

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{% raw %}
2+
<div ng-controller="MeetupCtrl">
3+
</div>
4+
{% endraw %}
File renamed without changes.

Diff for: static/js/controller.js

+19
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,23 @@ angular.module('utahPython', ['ui.router'])
2424
url: "/license",
2525
templateUrl: "license.html"
2626
});
27+
})
28+
.controller('MeetupCtrl', function($http) {
29+
var meetup = this;
30+
meetup.signed_url = "https://api.meetup.com/2/events?offset=0&format=json&limited_events=False&group_urlname=UtahPython&page=200&fields=&order=time&desc=false&status=upcoming&sig_id=10704711&sig=7eb0b440ac115c04d9133423ec0eb94c8d6ded89"
31+
32+
meetup.events = [];
33+
34+
meetup.loadGames = function loadGames () {
35+
$http.get(meetup.signed_url)
36+
.then(function success(result) {
37+
meetup.events = result.data;
38+
console.log(meetup.events);
39+
}, function error(error) {
40+
console.log(error);
41+
}); // .then promises to get games
42+
};
43+
44+
meetup.loadGames();
45+
2746
});

Diff for: upcoming.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ title: "Meetups"
44
upcoming-nav: True
55
---
66

7-
### Meetups
7+
## Meetups
88

9-
Hello
9+
Utah Python currently hosts 3 different meetups around Utah.
10+
11+
### Salt Lake City &amp; Draper
12+
13+
<a class="btn btn-success" href="http://www.meetup.com/UtahPython/"
14+
target="_blank"
15+
role="button">
16+
Join SLC’s Meetup Group
17+
<span class="glyphicon glyphicon-new-window"></span>
18+
</a>
19+
20+
{% include meetuptmpl.html %}
21+
22+
### Logan

0 commit comments

Comments
 (0)