Setting alert close to use ng-model