update ng-if in message directive