回顾AngularJS

来源:互联网 发布:数据透视表值显示文本 编辑:程序博客网 时间:2024/06/07 16:29
<html><head><meta charset="utf-8"><script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script><style>input.ng-invalid {    background-color: lightblue;}</style></head><body ><div ng-app="myApp" ng-controller="personCtrl"><p>姓名为 {{ lastName | uppercase }}</p></div><script type="text/javascript">angular.module('myApp', []).controller('personCtrl', function($scope) {    $scope.lastName ="qweq";});</script></body></html>

===================================================

<div ng-app="myApp" ng-controller="siteCtrl"> {{names}}</div><script>var app = angular.module('myApp', []);app.controller('siteCtrl', function($scope, $http) {  $http.post("http://localhost:8090/fc-internal-api/withdraw/loginSingle")  .success(function (response) {$scope.names = response.data;});});</script>
===================================================



0 0