This file contains hidden or 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
body> | |
<div ng-view></div> | |
<!-- In production use: | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/x.x.x/angular.min.js"></script> | |
--> | |
<script src="bower_components/angular/angular.js"></script> | |
<script src="bower_components/angular-route/angular-route.js"></script> | |
<script src="bower_components/angular-cookies/angular-cookies.js"></script> |
This file contains hidden or 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
<li ng-class="{active: currentList.title == list.title}" ng-repeat="list in lists track by $index"> | |
<a data-toggle="tab" href="#{{list.listId}}"> | |
<span class="badge pull-right">{{list.remainingCount}}</span> | |
<div class="destroy pull-right glyphicon glyphicon-trash" ng-click="removeList(list)"></div> | |
<strong>{{list.title}}</strong> | |
</a> | |
</li> |
This file contains hidden or 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
'use strict'; | |
/* Controllers */ | |
var taskListControllers = angular.module('taskListControllers', []); | |
taskListControllers.controller('TaskListCtrl', function TaskListCtrl($scope, $routeParams, $filter, $location, storage, Slug) { | |
'use strict'; | |
var LIST_STORAGE_ID = 'lists'; | |
storage.bind($scope, LIST_STORAGE_ID); |
This file contains hidden or 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
// Monitor the current route for changes and adjust the filter accordingly. | |
$scope.$on('$routeChangeSuccess', function () { | |
if ($routeParams.listId) { | |
var listId = $routeParams.listId.split("-").pop() | |
var list = lists[listId]; | |
if (list !== undefined && list !== $scope.currentList) { | |
$scope.currentList = list; | |
$scope.setTasks(); | |
} else if (list !== $scope.currentList) { |
This file contains hidden or 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
$scope.addList = function() { | |
var newList = $scope.newList.trim(); | |
if (!newList.length) { | |
return; | |
} | |
lists.push({ | |
listId: Slug.slugify(newList + '-' + lists.length), | |
title: newList, |
This file contains hidden or 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
body> | |
... | |
<!-- In production use: | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/x.x.x/angular.min.js"></script> | |
--> | |
<script src="bower_components/angular/angular.js"></script> | |
<script src="bower_components/angular-route/angular-route.js"></script> | |
<script src="bower_components/angular-cookies/angular-cookies.js"></script> |
This file contains hidden or 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
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"> | |
<link href="css/app.css" media="all" rel="stylesheet"> | |
<link href="bower_components/animate.css/animate.min.css" media="all" rel="stylesheet" type="text/css" /> | |
<link href="css/animations.css" media="all" rel="stylesheet"> | |
<link href="bower_components/font-awesome/css/font-awesome.min.css" media=all rel=stylesheet /> | |
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400' rel='stylesheet' type='text/css'> |
This file contains hidden or 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
<input class="hidden" type="hidden" ng-model="mailchimp.username" ng-init="mailchimp.username='kickdrop'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.dc" ng-init="mailchimp.dc='us3'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.u" ng-init="mailchimp.u='425ab2b3e010a637cca296582'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.id" ng-init="mailchimp.id='d2686186f0'"> |
This file contains hidden or 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
url = '//' + mailchimp.username + '.' + mailchimp.dc + '.list-manage.com/subscribe/post-json'; | |
params = { | |
'EMAIL': mailchimp.email, | |
'FNAME': mailchimp.fname, | |
'LNAME': mailchimp.lname, | |
'c': 'JSON_CALLBACK', | |
'u': mailchimp.u, | |
'id': mailchimp.id | |
}; | |
actions = { |
This file contains hidden or 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
// Send subscriber data to MailChimp | |
MailChimpSubscription.save( | |
// Successfully sent data to MailChimp. | |
function (response) { | |
// Define message containers. | |
mailchimp.successMessage = ''; | |
mailchimp.errorMessage = ''; | |
// Store the result from MailChimp | |
mailchimp.result = response.result; |