angularjs: Clean redundant assignment