初探angularjs 之helloworld
<html ng-app>
<head>
<script src="angular-1.0.1.min.js"></script>
</head>
<body>
hello{{yourname||'world'}}<br/>
your name:<input type="text" ng-model="yourname" placeholder="xiaoji">
</body>
</html>上例代码是ng-model:绑定一个模板类型yourname,在文本框中输入数据就能马上显示出来,不需要绑定事件
相关推荐
lupeng 2020-11-14
sjcheck 2020-11-10
meylovezn 2020-08-28
owhile 2020-08-18
Francismingren 2020-08-17
pythonclass 2020-07-29
sunzhihaofuture 2020-07-19
爱读书的旅行者 2020-07-07
行吟阁 2020-07-05
tianqi 2020-07-05
行吟阁 2020-07-04
冰蝶 2020-07-04
lyg0 2020-07-04
owhile 2020-07-04
opspider 2020-06-28
lengyu0 2020-06-28
tianqi 2020-06-21
dadaooxx 2020-06-16