1、问题背景
ng-model:把元素或变量绑定到应用程序
2、实现实例
<!DOCTYPE html> <html ng-app> <head> <Meta charset="UTF-8"> <title>AngularJS之ng-model命令</title> <script type="text/javascript" src="../js/angular.min.js" ></script> <script> </script> </head> <body> <div> <input type="text" ng-model="student" /><br> {{student}} </div> </body> </html>
3、实例结果
原文链接:https://www.f2er.com/angularjs/149085.html