Angular指令之restict匹配模式的详解 <body data-ng-app=myapp> <!-- directive: runn2 --> [removed] var app=angular.module(myapp,[]); app.directive('runn2',function(){ return{ restrict:EACM, replace:true, template:<h