2014-09-25 4 views
3

에 변수를 구문 분석하지 않습니다. 거기에 내가 제대로 inputIdinputName을 평가 볼 수 있습니다 페이지에 잘 파싱 HTML입니다 :AngularJS와 지시어는 내가 지시를 템플릿

<input id="inputId-52" type="text" name="inputName-52" ng-model="view.editableValue"> 

는하지만 디버거 구조를 확인할 때 나는 이름 inputName{{inputName}} 평가 것을 볼 : 또한 enter image description here

지시어 ng 형식으로 배치됩니다.

template: function(elem, attrs) { 
    return '<input type="text" name="' + attrs.class+ '">' 
} 

을 그리고 HTML에서 :

+0

모델 컨트롤러 생성시 보간법이 지원되지 않을 수 있습니다. 모델 컨트롤러는'{{inputName}}'이름으로 생성됩니다. – Chandermani

답변

0

당신은 당신의 지시 템플릿이 같은 뭔가를 할 수

<div class="yourInputName" click-to-edit-plain></div> 

마지막으로,이 새로운 각도 버전없는 이상 문제입니다.

관련 문제