Skip to content

Instantly share code, notes, and snippets.

View Shaun818's full-sized avatar

Younus Tareen Shaun818

View GitHub Profile
angular.module('caco.feed.filter', [])
.filter('sumByKey', function() {
return function(data, key) {
if (typeof(data) === 'undefined' || typeof(key) === 'undefined') {
return 0;
}
var sum = 0;
for (var i = data.length - 1; i >= 0; i--) {
sum += parseInt(data[i][key]);
@Shaun818
Shaun818 / index.htm
Last active August 29, 2015 14:15 — forked from bennadel/index.htm
<!doctype html>
<html ng-app="Demo" ng-controller="AppController">
<head>
<meta charset="utf-8" />
<title>AngularJS Routing</title>
<style type="text/css">
a {