One of the challenges I encountered is incorporating a directive that wraps the jQuery FullCalendar plugin into my project.
Here is how I implement the directive:
<div sg-calendar
format-column-header-month='dddd'
format-column-header-week='ddd/dd'
format-column-header-day='dddd/dd'
format-calendar-header-month='MMM, yyyy'
format-calendar-header-day='MMM dd, yyyy'
format-calendar-header-week-start='MMM dd'
format-calendar-header-week-end='-MMM dd, yyyy'
event-endpoint='REST/CalendarActivity'
event-fetch-endpoint='someRestUrl'
app-init-url='someRestUrl'
service-data-mintime='minTime'
service-data-maxtime='maxTime'
default-view='agendaDay'
width='100%'>
</div>
This represents my scope definition within the directive:
scope: {
// Configures the header in month mode.
formatColumnHeaderMonth: '@',
// Configures the header in week mode.
formatColumnHeaderWeek: '@',
// Configures the header in day mode.
formatColumnHeaderDay: '@',
// Configures the calendar header in month mode.
formatCalendarHeaderMonth: '@',
// Configures the calendar header in day mode
formatCalendarHeaderDay: '@',
// Configures the calendar header for start of week mode
formatCalendarHeaderWeekStart: '@',
// Configures the calendar header for end of week mode
formatCalendarHeaderWeekEnd: '@',
appInitUrl: '@',
eventEndpoint: '@',
eventFetchEndpoint: '@',
serviceDataMintime: '@',
serviceDataMaxtime: '@',
width: '@',
defaultView: '@',
height: '@'
},
In examining the attrs object from DevTools:
https://i.sstatic.net/vdRhr.png
I noticed a discrepancy with one property name. There seems to be an inconsistency between the attribute names defined in my scope and how they appear in the attrs object:
format-calendar-header-week-start='MMM dd'
and
formatCalendarHeaderWeekStart: '@',
However, as indicated by the attrs object, the property name is listed as:
formatCalendarHeaderWeek:"MMM dd"
The absence of the "Start" term at the end stands out to me.
Upon attempting to reference either scope.formatCalendarHeaderWeek
or
scope.formatCalendarHeaderWeekStart
, both return undefined. This issue does not occur with the other attributes.
My inquiry revolves around potential restrictions on attribute naming or any limitations on their length availability. Why would the final portion of my attribute name be omitted?
After conducting a thorough search, neither formatCalendarHeaderWeek
nor formatCalendarHeaderWeekStart
appear to be utilized elsewhere.
Appreciate your insights,