Skip to content

Commit

Permalink
make use of firebase
Browse files Browse the repository at this point in the history
get users from firebase while devs are still static
  • Loading branch information
pixelass committed Oct 11, 2015
1 parent b9dadb0 commit 7013feb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 27 deletions.
7 changes: 3 additions & 4 deletions app/elements/elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
<link rel="import" href="../bower_components/paper-toast/paper-toast.html">
<link rel="import" href="../bower_components/paper-toolbar/paper-toolbar.html">

<!-- firebase -->
<link rel="import" href="../bower_components/firebase-element/firebase-collection.html">

<!-- Uncomment next block to enable Service Worker Support (2/2) -->
<!--
<link rel="import" href="../bower_components/platinum-sw/platinum-sw-cache.html">
<link rel="import" href="../bower_components/platinum-sw/platinum-sw-register.html">
-->

<!-- Configure your routes here -->
<link rel="import" href="routing.html">
Expand All @@ -40,5 +41,3 @@
<link rel="import" href="../styles/shared-styles.html">
<link rel="import" href="user-info/user-info.html">
<link rel="import" href="user-list/user-list.html">
<!-- <link rel="import" href="my-greeting/my-greeting.html">
<link rel="import" href="my-list/my-list.html"> -->
37 changes: 16 additions & 21 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
<span>Dev Team</span>
</a>


<a data-route="users" href="/users" on-click="onDataRouteClick">
<iron-icon icon="face"></iron-icon>
<span>Users</span>
Expand Down Expand Up @@ -144,24 +143,22 @@ <h2 class="page-title">Dev team</h2>
url="data/dev-team.json"
handle-as="json"
content-type="application/json"
last-response="{{users}}"></iron-ajax>
<user-list users="{{users}}"></user-list>
last-response="{{devs}}"></iron-ajax>
<user-list users="{{devs}}"></user-list>
</paper-material>
</section>


<section data-route="users">
<paper-material elevation="1">
<h2 class="page-title">Users</h2>
<p>These users have contributed to the challenges</p>
<iron-ajax
auto
url="data/dev-team.json"
handle-as="json"
content-type="application/json"
last-response="{{users}}"></iron-ajax>
<user-list users="{{users}}"></user-list>
</paper-material>
<firebase-collection
order-by-child="name"
limit-to-first="3"
location="https://brilliant-inferno-5434.firebaseio.com/users"
data="{{users}}">
</firebase-collection><user-list users="[[users]]"></user-list>
</paper-material>
</section>

<section data-route="user-info">
Expand Down Expand Up @@ -200,24 +197,22 @@ <h2 class="page-title">Contact</h2>
</paper-drawer-panel>

<!-- Uncomment next block to enable Service Worker support (1/2) -->
<!--
<paper-toast id="caching-complete"
duration="6000"
text="Caching complete! This app will work offline."></paper-toast>

<platinum-sw-register auto-register
<platinum-sw-register auto-register
clients-claim
skip-waiting
on-service-worker-installed="displayInstalledToast">
<platinum-sw-cache default-cache-strategy="fastest"
<platinum-sw-cache default-cache-strategy="fastest"
cache-config-file="cache-config.json"></platinum-sw-cache>
</platinum-sw-register>
-->
</template>
</platinum-sw-register>
</template>

<!-- build:js scripts/app.js -->
<script src="scripts/app.js"></script>
<!-- endbuild-->
<!-- build:js scripts/app.js -->
<script src="scripts/app.js"></script>
<!-- endbuild-->
</body>

</html>
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"paper-elements": "PolymerElements/paper-elements#^1.0.1",
"platinum-elements": "PolymerElements/platinum-elements#^1.1.0",
"neon-elements": "PolymerElements/neon-elements#^1.0.0",
"page": "visionmedia/page.js#~1.6.3"
"page": "visionmedia/page.js#~1.6.3",
"firebase-element": "GoogleWebComponents/firebase-element#~1.0.6"
},
"devDependencies": {
"web-component-tester": "*",
"test-fixture": "PolymerElements/test-fixture#^1.0.0"
}
}
}

0 comments on commit 7013feb

Please sign in to comment.