new api of ngTableParams
move controller in separate file