This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html ng-app="MyApp" > | |
<head> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.1/angular.js"></script> | |
<script type="text/javascript"> | |
var app = angular.module('MyApp', []); | |
app.directive('colorpicker', function($parse) { | |
// sample color picker directive | |
// todo : bound to a ng-model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('list.controllers', []) | |
.controller('SingleListCtrl', [ | |
'$scope', | |
'$routeParams', | |
'$location', | |
'Lists', | |
'Products', | |
'Timestamp', | |
function($scope, $routeParams, $location, Lists, Products, Timestamp) { | |
console.log("SingleListCtrl : ", $routeParams.list_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('list.directives', []) | |
.directive('uiProducts', function($compile) { | |
return { | |
restrict: 'E', | |
replace: true, | |
transclude: true, | |
template: '<table>' + | |
'<tbody ng-repeat="category in categories">' + | |
'<tr ng-class="{purchased: category.purchased}">' + | |
'<td ng-class="{category: category.purchased}" colspan="4">' + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('lists.controllers', []). | |
controller('ListsCtrl', ['$rootScope', '$scope', 'Lists', '$dialog', function($rootScope, $scope, Lists, $dialog) { | |
console.log("dialog : ", $dialog); | |
$scope.list_filter = 'all'; | |
$scope.isCurrentListFilter = function(filter) { | |
return $scope.list_filter == filter; | |
}; | |
$scope.isNotMyList = function(owner) { | |
return $rootScope.current_user._id != owner._id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<!--<link href="css/nv.d3.css" rel="stylesheet">--> | |
<script src="lib/d3.v2.js" type="text/javascript" charset="utf-8"></script> | |
<!--<script src="lib/nv.d3.js" type="text/javascript" charset="utf-8"></script>--> | |
<style> | |
#chart svg { | |
height: 500px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test</title> | |
<!--<link href="css/nv.d3.css" rel="stylesheet">--> | |
<script src="lib/d3.v2.js" type="text/javascript" charset="utf-8"></script> | |
<!--<script src="lib/nv.d3.js" type="text/javascript" charset="utf-8"></script>--> | |
<style> | |
#chart svg { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in routers/App.bones initializeState | |
this.schemas = new models.Schemas(); | |
this.schemas.fetch() | |
.then(function(schemas) { | |
that.schemas = schemas; | |
}); | |
// this is to place in router function | |
$.when(this.schemas).then(function(schemas) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Interface { | |
changeStack(); // event listener, when a card in a stack is another stack | |
showStack(stack); | |
} | |
Stack { | |
showCard(); | |
nextCard(); | |
finish(); | |
} |