扯淡

<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>"
            }
        })
View Code

 

posted @ 2017-03-23 18:47  超级玛丽和大力水手  阅读(75)  评论(0编辑  收藏  举报