angular笔记_9
<style>
.red{background:red}
</style>
失去焦点
<input type="text" ng-model="title" ng-model-options="{updateOn:'blur'}">
{{title}}
<hr/>
3秒后
<input type="text" ng-model="name" ng-model-options="{debounce:3000}">
{{name}}
<hr/>
失去焦点或者3秒后更新
<input type="text" ng-model="city" ng-model-options="{updateOn:'default blur',debounce:{default:3000,blur:0}}">
{{city}}
<div ng-class="{red:true}">
aaaaa
</div>