add cosen directive
change chosen directive for work with $resource