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

Breaking Change in v0.1.0 #10

Closed
joshkurz opened this issue Apr 7, 2013 · 8 comments
Closed

Breaking Change in v0.1.0 #10

joshkurz opened this issue Apr 7, 2013 · 8 comments

Comments

@joshkurz
Copy link
Contributor

joshkurz commented Apr 7, 2013

We do need to make people aware that there is a breaking change in the new version. Since it was decided to go with a child scope in the new calendar we are no longer attaching the calendar to the scope object. This is because there is no way to have multiple calendars in the same scope and control them differently and it technically smashes the current scope which is bad, so we decided to go with a child scope so that all of the options can still be passed in.

The only difference is now you cannot call $scope.calendar.fullCalendar('changeView', 'agendaDay') anymore.

We need to come up with a way to solve this so that we can call methods like this from the scope without having to attach id's to the directive and make the user use jQuery.

@joshkurz
Copy link
Contributor Author

joshkurz commented Apr 7, 2013

or just let Jquery be the solution? the calendar already uses it to the max.

@yourilima
Copy link
Contributor

angular modules can make use of two way binging in scopes...

using scope : {calendar:'='} would bind it to a variable in the parent scope defined like this:

aint that the solution? gonna test it...

@joshkurz
Copy link
Contributor Author

joshkurz commented Apr 8, 2013

Yeah that would work.

Sent from my iPhone

On Apr 8, 2013, at 3:58 AM, yourilima notifications@github.com wrote:

angular modules can make use of two way binging in scopes...

using scope : {calendar:'='} would bind it to a variable in the parent scope defined like this:

aint that the solution? gonna test it...


Reply to this email directly or view it on GitHub.

@joshkurz
Copy link
Contributor Author

joshkurz commented Apr 8, 2013

But It would force the calendar to have an isolate scope which would cause the function objects to not be able to be passed in and called correctly.

Sent from my iPhone

On Apr 8, 2013, at 3:58 AM, yourilima notifications@github.com wrote:

angular modules can make use of two way binging in scopes...

using scope : {calendar:'='} would bind it to a variable in the parent scope defined like this:

aint that the solution? gonna test it...


Reply to this email directly or view it on GitHub.

@yourilima
Copy link
Contributor

In my opinion it would be better to isolate the scope and bind any operations that could be useful to the user trough binding.
with just binding the calendar by {calendar:'='} (and adding a controller) I now also have exposed full control of the fullcalendar object (desirability of that is questionable but it opens up control)

Isolation of the scope is in my opinion a must. especially if you want to have multiple instances in one page.

@joshkurz
Copy link
Contributor Author

joshkurz commented Apr 9, 2013

Can you show an example please?

Sent from my iPhone

On Apr 9, 2013, at 4:24 AM, yourilima notifications@github.com wrote:

In my opinion it would be better to isolate the scope and bind any operations that could be useful to the user trough binding.
with just binding the calendar by {calendar:'='} (and adding a controller) I now also have exposed full control of the fullcalendar object (desirability of that is questionable but it opens up control)

Isolation of the scope is in my opinion a must. especially if you want to have multiple instances in one page.


Reply to this email directly or view it on GitHub.

@yourilima
Copy link
Contributor

take a look at my pull request on issue #11

joshkurz added a commit to joshkurz/ui-calendar that referenced this issue Apr 10, 2013
@joshkurz
Copy link
Contributor Author

fixed with #11

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

No branches or pull requests

2 participants