[#138] simplify saveQuery, drop $route dependency
[#138] fix ui-codemirror bug when used as directive