admin管理员组文章数量:1416113
I'm learning AngularJS with Dan Wahlin's tutorial (). I have the following code in my views/index.jade:
!!! 5
html(data-ng-app='')
head
title Angular Tutorial
body
| Name:
br
input(type='text', data-ng-model='name') | {{name}}
script(src='.0.8/angular.min.js', type='text/javascript')
But when I run the app, and type anything in the Name box, it does not display the text like it does in the tutorial. What am I doing wrong?
I'm learning AngularJS with Dan Wahlin's tutorial (http://youtu.be/i9MHigUZKEM?t=13m35s). I have the following code in my views/index.jade:
!!! 5
html(data-ng-app='')
head
title Angular Tutorial
body
| Name:
br
input(type='text', data-ng-model='name') | {{name}}
script(src='https://ajax.googleapis./ajax/libs/angularjs/1.0.8/angular.min.js', type='text/javascript')
But when I run the app, and type anything in the Name box, it does not display the text like it does in the tutorial. What am I doing wrong?
Share Improve this question asked Sep 19, 2013 at 4:27 tldrtldr 12.1k15 gold badges80 silver badges122 bronze badges1 Answer
Reset to default 6Put your binding on the next row. The previous one sets it inside the input (which doesn't make sense).
input(type='text', data-ng-model='name')
| {{name}}
本文标签: javascriptAngularjs with Jade and Expressdata binding not workingStack Overflow
版权声明:本文标题:javascript - Angular.js with Jade and Express - data binding not working - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744703180a2620681.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论