Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit a9fbf68

Browse files
committed
docs(README): updating calendar object accessibility documentation
Signed-off-by: Josh Kurz <jkurz25@gmail.com>
1 parent 6397ee6 commit a9fbf68

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,20 @@ All the Arshaw Fullcalendar options can be passed through the directive. This ev
7777

7878
The ui-calendar directive plays nicely with ng-model.
7979

80-
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.
80+
An Event Sources objects needs to be created to pass into ng-model. This object's values will be watched for changes. If a change occurs, then that specific calendar will call the appropriate fullCalendar method.
8181

8282
The ui-calendar directive expects the eventSources object to be any type allowed in the documentation for the fullcalendar. [docs](http://arshaw.com/fullcalendar/docs/event_data/Event_Source_Object/)
8383
Note that all calendar options which are functions that are passed into the calendar are wrapped in an apply automatically.
8484

8585
## Accessing the calendar object
8686

87-
To avoid potential issues, by default the calendar object is not available in the parent scope. Access the object by declaring a calendar attribute name:
87+
It is possible to access a specific calendar object by declaring a name for it on the uiCalendar directive. In this next line we are naming the calendar 'myCalendar'. This will be attached to the uiCalendarConfig constant object, that can be accessed via DI.
8888

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

91-
Now the calendar object is available in the parent scope:
91+
Now the calendar object is available in uiCalendarConfig.calendars:
9292

93-
$scope.myCalendar.fullCalendar
93+
uiCalendarConfig.calendars.myCalendar
9494

9595
This allows you to declare any number of calendar objects with distinct names.
9696

0 commit comments

Comments
 (0)