이 질문에 대한 답변과 비슷한 질문이 있지만 나에게 도움이되는 해결책이 없음을 알고 있습니다.지시어 안의 각형 HTML 템플릿은 렌더링되지 않습니다
static
----calendar
--------calendar.controller.js
--------calendar.view.html
----home
--------home.controller.js
--------home.view.html
----app.js
----index.html
내부 calendar.controller.js I는 다음과 같습니다 내 캘린더에 대한 지침을 만들었습니다 : 나는 다음과 같은 폴더 구조가 난 집에서 해당 캘린더 템플릿을 렌더링하기 위해 노력하고
.directive('myCalendar',function(){
return{
restrict:'E',
template:"calendar.view.html"
}
})
.view.html 성공하지 못했습니다.
내 home.view.html이 있습니다 : 브라우저에
<my-calendar></my-calendar>
을 실제로 내가 그 바인딩 만들려고 노력하고있는 경로를 표시합니다 (브라우저에 당신은 "./calendar/calendar를 볼 수 있습니다 .view.html "). 그리고 지시문의 경로를 여러 가지 방법으로 변경해 보았습니다.
- template:"./calendar.view.html"
- template:"/calendar.view.html"
- template:"./calendar/calendar.view.html"
- template:"/calendar/calendar.view.html"
...하지만 여전히 작동하지 않습니다. 고맙습니다.
당신이 templateUrl 필요 실수
시도'대신 templateUrl''template' –
* - * 딱! 대단히 감사합니다;) –