Rewrite query backend; use angularjs to render.