<head> <meta charset="utf-8" /> <title></title> </head> <body ng-app="ap"> <!--<div ng-init="aa=10">{{aa}}</div>--> <!--<input type="text" ng-model="x" /> <span ng-bind="x"></span>--> <!--<div id="x" ng-init="aa=10">{{aa}}</div>--> <c></c> <script src="js/angular1.min.js"></script> <script> var app=angular.module("ap",[]) app.directive("c",function(){ return{ restrict:"E", replace:true, template:"<h1>今天</h1>" } })