white knight

导航

 

参考 http://www.jb51.net/article/83051.htm

 

angluar.module("aaa").directive("testDirective", function() {

  return {

    scope : {

     param1 : "=",

     param2 : "="

    },

    template : "<input ng-model='param1' /><input ng-model="param2" />"

  }

});

 

<div test-directive="true" param1="parent.pa1" param2="parent.pa2"></div>

posted on 2018-04-27 09:23  white knight  阅读(156)  评论(0编辑  收藏  举报