标签:doc java var javascrip set span 自定义 script return
<!DOCTYPE html>
<html ng-app="myApp" >
<head lang="en">
<meta charset="UTF-8">
<title>T2</title>
<script src="js/angular.js" type="text/javascript"></script>
</head>
<body>
<p class="run-directive"></p>
</body>
<script>
var app=angular.module("myApp",[]);
app.directive("runDirective", function () { //去掉横杠,d大写
return{
restrict:"C",
template:"<h1>自定义的指令!</h1>"
};
});
</script>
</html>
标签:doc java var javascrip set span 自定义 script return
原文地址:http://www.cnblogs.com/mx2036/p/6705022.html