参考 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>