Skip to content

Instantly share code, notes, and snippets.

"use strict";
describe("ListController", function() {
beforeEach(module("dashboard"));
var $controller;
beforeEach(inject(function(_$controller_) {
$controller = _$controller_;
}));
@jaseflow
jaseflow / .js
Created August 21, 2015 03:04
lists controller
"use strict";
app.controller("ListCtrl", function($scope, $stateParams, $firebaseObject) {
var ref = new Firebase("https://psi-dashboard.firebaseio.com/lists"),
activeList = $stateParams.listName;
$scope.lists = $firebaseObject(ref);
$scope.results = $firebaseObject(ref.child(activeList));
$scope.activeList = activeList;
$scope.dataLoaded = false;
@jaseflow
jaseflow / .html
Created August 5, 2015 00:00
change order
<style>
.flex {
display: flex;
}
div div:nth-child(3) {
order: 2; /* Move third flex item to second spot */
}
</style>
<div class="flex">
<div>1</div>
@jaseflow
jaseflow / .html
Last active August 29, 2015 14:26
Grow example
<style>
.flex {display: flex;}
.grow {flex-grow: 1;}
/* Assume there are more styles here to make the boxes blue */
</style>
<div class="flex">
<div></div>
<div class="grow"></div>
<div></div>
@jaseflow
jaseflow / .html
Last active August 29, 2015 14:26
Flip me
<style>
.flip-me-and-space-me-evenly {
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
}
/* Assume there are more styles here to make the boxes blue */
</style>
<div class="flip-me-and-space-me-evenly">
@jaseflow
jaseflow / .css
Created August 4, 2015 23:14
Stack it
.stack-it {
display: flex;
flex-direction: column;
}
@jaseflow
jaseflow / .html
Last active August 29, 2015 14:26
Horizontal center
<style>
.horizontal-center {
display: flex;
justify-content: center;
}
/* Assume there are more styles here to make the boxes blue */
</style>
<div class="horizontal-center">
<div></div>
@jaseflow
jaseflow / .html
Last active August 29, 2015 14:26
Space around
<style>
.space-around {
display: flex;
justify-content: space-around;
}
/* Assume there are more styles here to make the boxes blue */
</style>
<div class="space-around">
<div></div>
@jaseflow
jaseflow / .html
Last active August 29, 2015 14:26
Space between
<style>
.space-between {
display: flex;
justify-content: space-between;
}
/* Assume there are more styles here to make the boxes blue */
</style>
<div class="space-between">
<div></div>
@jaseflow
jaseflow / .css
Last active August 29, 2015 14:26
Center it!
.dead-center {
display: flex;
justify-content: center; /* main axis (horizontal) */
align-items: center; /* cross axis (vertical) */
}