mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-03-30 17:03:39 +08:00
docs(cookbook/helloworld): display "World" if no name is entered
This commit is contained in:
committed by
Pete Bacon Darwin
parent
8264d08085
commit
3621896e9d
@@ -10,9 +10,9 @@
|
||||
}
|
||||
</script>
|
||||
<div ng-controller="HelloCntl">
|
||||
Your name: <input type="text" ng-model="name" value="World"/>
|
||||
Your name: <input type="text" ng-model="name"/>
|
||||
<hr/>
|
||||
Hello {{name}}!
|
||||
Hello {{name || "World"}}!
|
||||
</div>
|
||||
</doc:source>
|
||||
<doc:scenario>
|
||||
|
||||
Reference in New Issue
Block a user