두 개의 블록으로 뷰를 생성하려고합니다. 각 블록은 다른 실시간 데이터 소스를 가졌습니다. 내가 사용하는 경우 Jade`s는 기본보기에서 다음과 같습니다 동적 데이터가 포함 된 Jade/Pug의 부분 템플릿
extends ../layout
block content
link(rel='stylesheet', type='text/css', href='/stylesheets/people.css')
include ../store/peopleTemplate.pug
내가 오류를
Cannot read property 'people' of undefined.
데이터가 아직로드되어 있기 때문에 그 이유는 얻을. 제외 할 경우 포함 및 대신 데이터 사용을 다시 활성화하는 함수에서
res.render(template, { data:localData });
템플릿은보기에 추가되지 않습니다.
다른 소스의 동적 데이터가 포함 된 2 개 이상의 부분 뷰를 1 개의 뷰에 추가하는 방법은 무엇입니까? 감사합니다.