我有一些问题,我使用带有角度的ui日历的完整日历,一切正常,但是如果我尝试从外部来源包含那个日历,那么我的所有活动都会被破坏,任何提示?
//这是一个非常大的代码,但是这是第一个正在运行的日历。
<div class="calendar ng-pristine ng-untouched ng-valid ng-isolate-scope fc fc-unthemed fc-ltr ng-not-empty" ng-model="eventSources" ui-calendar="uiConfig.calendar" calendar="customerCalendar">
<div class="fc-toolbar fc-header-toolbar">
<div class="fc-left">
<div class="fc-button-group">
<button type="button" class="fc-prev-button fc-button fc-state-default fc-corner-left fc-state-disabled" disabled=""><span class="fc-icon fc-icon-left-single-arrow"></span></button>
<button type="button" class="fc-next-button fc-button fc-state-default fc-corner-right"><span class="fc-icon fc-icon-right-single-arrow"></span></button>
</div>
</div>
<div class="fc-right">
<div class="fc-button-group">
<button type="button" class="fc-month-button fc-button fc-state-default fc-corner-left">Monat</button>
<button type="button" class="fc-agendaWeek-button fc-button fc-state-default fc-corner-right fc-state-active">Woche</button>
</div>
</div>
<div class="fc-center">
<h2>10 – 11 Juni.2017</h2></div>
<div class="fc-clear"></div>
</div>
<div class="fc-view-container">
<div class="fc-view fc-agendaWeek-view fc-agenda-view">
<table>
<thead class="fc-head">
<tr>
<td class="fc-head-container fc-widget-header">
<div class="fc-row fc-widget-header" style="border-right-width: 1px; margin-right: 14px;">
<table>
<thead>
<tr>
<th class="fc-axis fc-widget-header" style="width: 17px;"></th>
<th class="fc-day-header fc-widget-header fc-disabled-day">Mo. 5.6</th>
<th class="fc-day-header fc-widget-header fc-disabled-day">Di. 6.6</th>
<th class="fc-day-header fc-widget-header fc-disabled-day">Mi. 7.6</th>
<th class="fc-day-header fc-widget-header fc-disabled-day">Do. 8.6</th>
<th class="fc-day-header fc-widget-header fc-disabled-day">Fr. 9.6</th>
<th class="fc-day-header fc-widget-header fc-sat fc-future" data-date="2017-06-10"><span>Sa. 10.6</span></th>
<th class="fc-day-header fc-widget-header fc-sun fc-future" data-date="2017-06-11"><span>So. 11.6</span></th>
</tr>
</thead>
</table>
</div>
</td>
</tr>
</thead>
<tbody class="fc-body">
<tr>
<td class="fc-widget-content">
<div class="fc-scroller fc-time-grid-container" style="overflow-x: hidden; overflow-y: scroll; height: 468px;">
<div class="fc-time-grid fc-unselectable">
<div class="fc-bg">
<table>
<tbody>
<tr>
<td class="fc-axis fc-widget-content" style="width: 17px;"></td>
<td class="fc-day fc-widget-content fc-disabled-day"></td>
<td class="fc-day fc-widget-content fc-disabled-day"></td>
<td class="fc-day fc-widget-content fc-disabled-day"></td>
<td class="fc-day fc-widget-content fc-disabled-day"></td>
<td class="fc-day fc-widget-content fc-disabled-day"></td>
<td class="fc-day fc-widget-content fc-sat fc-future" data-date="2017-06-10"></td>
<td class="fc-day fc-widget-content fc-sun fc-future" data-date="2017-06-11"></td>
</tr>
</tbody>
</table>
</div>
<div class="fc-slats">
<table>
<tbody>
<tr data-time="00:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>00</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="00:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="01:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>01</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="01:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="02:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>02</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="02:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="03:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>03</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="03:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="04:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>04</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="04:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="05:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>05</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="05:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="06:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>06</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="06:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="07:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>07</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="07:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="08:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>08</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="08:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="09:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>09</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="09:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="10:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>10</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="10:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="11:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>11</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="11:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="12:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>12</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="12:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="13:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>13</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="13:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="14:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>14</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="14:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="15:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>15</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="15:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="16:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>16</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="16:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="17:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>17</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="17:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="18:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>18</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="18:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="19:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>19</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="19:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="20:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>20</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="20:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="21:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>21</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="21:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="22:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>22</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="22:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="23:00:00">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"><span>23</span></td>
<td class="fc-widget-content"></td>
</tr>
<tr data-time="23:30:00" class="fc-minor">
<td class="fc-axis fc-time fc-widget-content" style="width: 17px;"></td>
<td class="fc-widget-content"></td>
</tr>
</tbody>
</table>
</div>
<div class="fc-content-skeleton">
<table>
<tbody>
<tr>
<td class="fc-axis" style="width: 17px;"></td>
<td>
<div class="fc-content-col">
<div class="fc-event-container fc-helper-container"></div>
<div class="fc-event-container"></div>
<div class="fc-highlight-container"></div>
<div class="fc-bgevent-container"></div>
<div class="fc-business-container"></div>
</div>
</td>
<td>
<div class="fc-content-col">
<div class="fc-event-container fc-helper-container"></div>
<div class="fc-event-container"></div>
<div class="fc-highlight-container"></div>
<div class="fc-bgevent-container"></div>
<div class="fc-business-container"></div>
</div>
</td>
<td>
<div class="fc-content-col">
<div class="fc-event-container fc-helper-container"></div>
<div class="fc-event-container"></div>
<div class="fc-highlight-container"></div>
<div class="fc-bgevent-container"></div>
<div class="fc-business-container"></div>
</div>
</td>
<td>
<div class="fc-content-col">
<div class="fc-event-container fc-helper-container"></div>
<div class="fc-event-container"></div>
<div class="fc-highlight-container"></div>
<div class="fc-bgevent-container"></div>
<div class="fc-business-container"></div>
</div>
</td>
<td>
<div class="fc-content-col">
<div class="fc-event-container fc-helper-container"></div>
<div class="fc-event-container"></div>
<div class="fc-highlight-container"></div>
<div class="fc-bgevent-container"></div>
<div class="fc-business-container"></div>
<div class="fc-now-indicator fc-now-indicator-line" style="top: 557.8px;"></div>
</div>
</td>
<td>
<div class="fc-content-col">
<div class="fc-event-container fc-helper-container"></div>
<div class="fc-event-container"></div>
<div class="fc-highlight-container"></div>
<div class="fc-bgevent-container"></div>
<div class="fc-business-container"></div>
</div>
</td>
<td>
<div class="fc-content-col">
<div class="fc-event-container fc-helper-container"></div>
<div class="fc-event-container"></div>
<div class="fc-highlight-container"></div>
<div class="fc-bgevent-container"></div>
<div class="fc-business-container"></div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="fc-now-indicator fc-now-indicator-arrow" style="top: 557.8px;"></div>
</div>
<hr class="fc-divider fc-widget-header" style="display: none;">
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
如果我将此文件放在外部文件中,并尝试包含它,我在app.js中创建的每个事件都会被破坏,例如
$ scope.removeThisEvent = function(event_id){ $ scope.customerCalendar.fullCalendar( 'REMOVEEVENTS'); $ scope.events.splice(0);
控制台出错:TypeError:$ scope.customerCalendar未定义
所有这些日历护理都拥有自己的控制器 https://jsfiddle.net/meridies/d0dporc7