Whenever I click the button, I want to either execute createRole() if RoleName is not set or EditRole() method if RoleName is set. However, for some reason, EditRole() is being executed for both cases.
<button type="submit" ng-click="selectedItem.RoleName? EditRole() : createRole()">Save Changes</button>