下面是我用我的自定義控件code.I問題 問題已經創建了兩個自定義控制自定義指令角不正確的行爲
<pv-Show-Box></pv-Show-Box>
<pv-Hello>Praveen</pv-Hello>
both are working fine but <pv-show-Box> is not working when it is in reverse order
like
<pv-Hello>Praveen</pv-Hello>
<pv-Show-Box></pv-Show-Box>
mumodule.directive('pvShowBox', function() {
return {
restrict: 'E',
template: '<div><input type="text" ng-model="txtfieldData" ></input> {{ txtfieldData }}</div>',
replace: true
}
});
mumodule.directive('pvHello', function() {
return {
restrict: 'E',
template: '<span ng-transclude>Hello </span>',
replace: true
};
});
任何想法?
有什麼錯誤,你見過瀏覽器的控制檯嗎? – Chandermani
需要的對象... –