내가 원할 것입니다.angularJs ng-repeat ... 동적 인 ng-include, ng-controller, ng-init
<div ng-include="'templates/control/title.html'" ng-controller="titleCtrl" ng-init="ControlInit('00001')"></div>
<div ng-include="'templates/control/title.html'" ng-controller="titleCtrl" ng-init="ControlInit('00002')"></div>
<div ng-include="'templates/control/title.html'" ng-controller="titleCtrl" ng-init="ControlInit('00003')"></div>
그래서, ng-repeat done.
<div ng-repeat="control in Controls" ng-include="'control.ctrlUrl'" ng-controller="control.ctrlName" ng-init="control.ctrlInit + '(' + control.ctrlCode + ')'"></div>
할 작동하지 ... 왜?
하시기 바랍니다 .... 응답 코드 ... 예 ... 당신은 '
작은 따옴표 안에 control.ctrlUrl
를 넣을 필요가 없습니다
무엇이 오류입니까? – GANI
먼저 [MCV] (http://stackoverflow.com/help/mcve) 질문 –
오류 목록을 작성하는 방법을 읽어보십시오 1. ng-controller need 'string'이 필요합니다. 2. ng-init이 작동하지 않습니다. – user6876771