use ng-switch to realize warning-text