Update angularjs to 1.0.4, fix database sample