标签:char prot round meta har input options ret div
<!DOCTYPE HTML>
<html ng-app="myApp">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<style>
.red{ background:red;}
.yellow{ background:yellow;}
</style>
<script src="angular.min.js"></script>
<script>
/*var m1 = angular.module(‘myApp‘,[]);
m1.controller(‘Aaa‘,[‘$scope‘,function($scope){
$scope.text = ‘hello‘;
}]);*/
var m1 = angular.module(‘myApp‘,[]);
m1.controller(‘Aaa‘,[‘$scope‘,FnAaa]);
function FnAaa($scope){
}
FnAaa.prototype.num = ‘123‘;
FnAaa.prototype.text = ‘hello‘;
FnAaa.prototype.show = function(){
return ‘angularJS‘;
};
</script>
</head>
<body>
<!--<div ng-controller="Aaa">
<input type="text" ng-model="text" ng-model-options="{updateOn : ‘blur‘}">
<div>{{text}}</div>
</div>-->
<div ng-controller="FnAaa as a1">
<div>{{a1.text}}:{{a1.show()}}</div>
</div>
</body>
</html>
标签:char prot round meta har input options ret div
原文地址:http://www.cnblogs.com/songyunxinQQ529616136/p/6247215.html