मैं कैसे विशेषताओं के रूप में पारित कर दिया क्षेत्रों के साथ-साथ कोणीय गुंजाइश के लिए कस्टम फ़ील्ड जोड़ सकते हैं, निम्नलिखित के रूप में:AngularJS कस्टम निर्देश अलग गुंजाइश कस्टम फ़ील्ड
angular.module('app')
.directive("myDirective", function(){
function NewObj()
{
this.id = 0;
this.name = "";
}
return{
restrict: "E",
templateUrl:"partials/directives/temp.html",
scope:{
viewId:"=",
dataObj: new NewObj() //This is the custom obj
}
}
}
जब मैं ऐसा, मैं अमान्य अलग गुंजाइश मिल परिभाषा। इसे कैसे पूरा किया जा सकता है?
यहाँ निर्देश स्कोप के बारे में एक सभ्य व्याख्या दी गई है: http://umur.io/angularjs-directives-using-isolated-scope-with-attributes/ –