Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular-calendar.d.ts.ɵk.html:18 ERROR TypeError: Cannot read property 'primary' of undefined (Angular 5.1) #460

Closed
TheFern16 opened this issue Feb 9, 2018 · 3 comments

Comments

@TheFern16
Copy link

TheFern16 commented Feb 9, 2018

This error occurs with status front end data, or with observable usage.

The data is properly formatted.

I noticed this issue occurred in previous versions of Angular, and Angular Calendar.

Any help for this would be greatly appreciated!

angular-calendar.d.ts.ɵk.html:18 ERROR TypeError: Cannot read property 'primary' of undefined
at Object.eval [as updateRenderer] (angular-calendar.d.ts.ɵk.html:21)
at Object.debugUpdateRenderer [as updateRenderer] (core.js:14727)
at checkAndUpdateView (core.js:13841)
at callViewAction (core.js:14187)
at execEmbeddedViewsAction (core.js:14145)
at checkAndUpdateView (core.js:13837)
at callViewAction (core.js:14187)
at execEmbeddedViewsAction (core.js:14145)
at checkAndUpdateView (core.js:13837)
at callViewAction (core.js:14187)

@TheFern16 TheFern16 changed the title Cannot read property 'primary' of undefined (Angular 5.1) angular-calendar.d.ts.ɵk.html:18 ERROR TypeError: Cannot read property 'primary' of undefined (Angular 5.1) Feb 9, 2018
@mattlewis92
Copy link
Owner

It sounds like one or more of your events is missing the color object. Every event needs to have one set like:

color: {
    primary: '#ad2121',
    secondary: '#FAE3E3'
}

@etwillbefine
Copy link
Collaborator

For consideration: In our project we load based on users settings a different style template. I think it would be cool to add some default values to the events (whatever looks nice when using a "non-customized" calendar)
In our case we wouldn't need to specify some "random colors" and override them later on via css and on the other side people don't need to configure colors if not needed (imagine the event dto looks similar besides the colors... :D)

@TheFern16
Copy link
Author

Hey guys thank you for the support. I was missing the color object. When I added a default color to each item it rendered (without errors).

I think it would be cool to add some default values to the event to our project too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants