refactor($compile): improve readability on conditional assignment
refactor($compile): improve readability on conditional assignment

Use ternary operator instead of if statement

Closes #5065

ggershoni/angular.js,ggershoni/angular.js,ggershoni/angular.js,ggershoni/angular.js