2014-04-14 6 views
2

일단 앱이 완전히 초기화되면이 오류가 계속 발생합니다. 정상적으로 작동합니다. 환경 : liveaddress.js JQuery와 5.2 1.10.2 1.10.4 jqueryui가 각도 1.2.15 (베이스, 라우팅,, 과자, -resource, -sanitize) 기초 재단 tpls-0.1.0 모더 나이저 .1 fullcalendar 1.6.4 angular-ui-calendar 0.8.0각도 UI 캘린더 TypeError : 정의되지 않은 'length'속성을 읽을 수 없습니다.

나는 이것들을 꺼 냈지만 변화는 없었다.

소스 JSON은 다음과 같다 : (

[{"title":"A Night in Old Havana","start":"2013-04-21T07:00:00Z","status":"COMPLETED","id":"aa4af241f9c0bc3375921a9c82f33dc6","unix_start":1366527600},{"title":"A Test Event","start":"2014-02-14T08:00:00Z","status":"BID","id":"fe2ce779b1817a56718aa62774f0f58b","unix_start":1392364800},{"title":"A Very Nice Party","start":"2014-04-04T07:00:00Z","status":"ACTIVE","id":"5bf965595ef247a6f922b930220172ad","unix_start":1396594800},{"title":"Birthday Party for Anne Marie","start":"2014-04-06T07:00:00Z","status":"ACTIVE","id":"5cd30308871bd4465fdcf7219707fd12","unix_start":1396767600},{"title":"A test event","start":"2014-05-01T07:00:00Z","status":"BID","id":"fc1cd8ae2d328e948520d5fee695c7e3","unix_start":1398927600}] 

오류가 제어로드시 게시가 초기 데이터로드를 수신 한 이후 다시 발생하고, 상기 경로가 캘린더를 표시하도록 변경 될 때마다 어느 부분적으로).

아이디어가 있으십니까? 말했듯이 궁극적으로는 잘 작동하지만 오류로 인해 문제가 발생합니다.

감사합니다.

답변

2

아마도 모델을 ui-calendar 요소에서 제외했을 것입니다. docs에서 여기

An Event Sources objects needs to be created to pass into ng-model. This object will be watched for changes and update the calendar accordingly, giving the calendar some Angular Magic.

...

<div ui-calendar="calendarOptions" ng-model="eventSources" calendar="myCalendar"> 

그리고 FullCalendar eventSourcesdocs에 대한 링크입니다.

+0

궁극적으로 문제가 해결되었습니다. 고맙습니다. 모델 레퍼런스를 처음 추가했을 때, 나는 캘린더에서 두 개의 항목을보기 시작했으나 이제는 작동합니다. – JoeyR

+0

고마워, 내 문제가 해결 됐어! – richard

관련 문제