change from ng-show to ng-if, because with ng-show, the html element will still be there and expressions which is invalid in the context will still be watched and evaluated