【发布时间】:2017-08-31 07:06:52
【问题描述】:
有一个指令将 M 限制为跟随代码。但是页面上没有任何输出。怎么了?谢谢!
<!DOCTYPE html>
<html ng-app="app">
<head>
<script type="text/javascript" src="lib/angular.min.js"></script>
<script type="text/javascript">
var app = angular.module('app',[]);
app.controller('indexCtrl',function($scope){
});
app.directive('di',function(){
return{
restrict:"M",
template:'abc'
};
})
</script>
</head>
<body ng-controller="indexCtrl">
<!-- directive:di -->
</body>
</html>
【问题讨论】:
标签: angularjs angularjs-directive