Initial, virgin install of yo angular
Weird - the plain vanilla yo angular didn't work!

It was missing karma-jasmine and karma-chrome-launcher.

Did npm install --save-dev <file>  , then grunt test, grunt serve, grunt serve:dist, and grunt build --> all worked.
note on karma added to gruntfile
Created HiNsigth boilerplate instead of Yeoman boilerplate.

Tested grunt serve, test, build, serve:dist
removed yeomans main.css
Added db_createviews with initial views.

The original, manually created view is

{
    "_id": "_design/by",
    "_rev": "4-3d365f8e7724928c0a6ddf83691cb661",
    "views": {
        "id": {
            "map": "function(doc) {\n    if (doc.id) {\n        emit(doc.id, doc);\n    }\n}"
        },
        "snaps_since": {
            "reduce": "_sum",
            "map": "function(doc) {\n    var numPosts=0;    \n    if (doc.history) { \n        for (i=0; i<doc.history.length; i++) { \n            rec=doc.history[i];\n            if (rec.timestamp_str) { // >= req.timstamp\n                numPosts++;\n            }\n        }\n    }\n  emit(doc._id, numPosts);\n}"
        }
    },
    "language": "javascript"
}
Better version of managing views, using couchapp.
snaps-per-day view is working:

https://cs.cloudant.com/news/_design/by/_view/snaps-per-day?group=true

{"rows":[
{"key":"2014-01-28","value":3600},
{"key":"2014-01-29","value":16860},
{"key":"2014-01-30","value":17160},
{"key":"2014-01-31","value":17160},
{"key":"2014-02-01","value":17220},
{"key":"2014-02-02","value":17160},
{"key":"2014-02-03","value":17100},
{"key":"2014-02-04","value":17037},
{"key":"2014-02-05","value":16934},
{"key":"2014-02-06","value":16740},
{"key":"2014-02-07","value":17220},
{"key":"2014-02-08","value":17220},
{"key":"2014-02-09","value":16562},
{"key":"2014-02-11","value":120},
{"key":"2014-02-12","value":13811},
{"key":"2014-02-13","value":12194},
{"key":"2014-02-14","value":17430},
{"key":"2014-02-15","value":17220},
{"key":"2014-02-16","value":17220},
{"key":"2014-02-17","value":17160},
{"key":"2014-02-18","value":16530},
{"key":"2014-02-19","value":17040},
{"key":"2014-02-20","value":17160},
{"key":"2014-02-21","value":17220},
{"key":"2014-02-22","value":16518},
{"key":"2014-02-23","value":17048},
{"key":"2014-02-24","value":17160},
{"key":"2014-02-25","value":17160},
{"key":"2014-02-26","value":17220},
{"key":"2014-02-27","value":17190},
{"key":"2014-02-28","value":17190},
{"key":"2014-03-01","value":17160},
{"key":"2014-03-02","value":17220},
{"key":"2014-03-03","value":17160},
{"key":"2014-03-04","value":17160},
{"key":"2014-03-05","value":17220},
{"key":"2014-03-06","value":16945},
{"key":"2014-03-07","value":16115},
{"key":"2014-03-08","value":17280},
{"key":"2014-03-09","value":17220},
{"key":"2014-03-10","value":17220},
{"key":"2014-03-11","value":17220},
{"key":"2014-03-12","value":1860}
]}
Interim - lots of work (mostly ineffective!) getting requirejs to work.

I finally think I've figured it out.  This isn't tested, but it's not throwing any obvious errors, so good place to commit.
interim
I think I'm going to back all this requirejs stuff out. A waste of a day, but probably the right call.
Revert back to before all the requirejs work.

Revert "Interim - lots of work (mostly ineffective!) getting requirejs to work."

This reverts commit 224829214b853d125e2bbaa753d58e5bf68a13cb.
Working on getData and unit testing.

Working so far.
Reformatted Gruntfile (4 space indents)
Angular starting to stitch together:
    * getData service
    * hist directive
    * routed to by page

All is still just stubbed code (except getData), but its working.
Added http-rewrite-middleware and created rule so that it always serves /index.html

Reason:
    When you are testing page /snapsPerDay you can refresh and it will still serve you /snapsPerDay (not 'GET cannot get /snapsPerDay')
added d3, but not using it yet
V0 of spdChart directive using rickshaw.
interim-working
interim-working