Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

feat(component): Support expressions and mapping to controllers #61

Closed
wants to merge 12 commits into from

Conversation

mhevery
Copy link
Contributor

@mhevery mhevery commented Jul 31, 2013

No description provided.

@@ -297,6 +298,7 @@ class _ComponentFactory {
if (directive.$publishAs != null) {
shadowScope[directive.$publishAs] = controller;
}
createAttributeMapping(scope, shadowScope, controller, parser);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately that is not possible. We can't assign until controller is
constructed. That means that it is not possible to have everything assigned
before the constructor runs.

As much as I don't like it, I think we should optionally have init method
an the controller which would get called once all of the assignment is
done. What do you think about that?

On Tue, Jul 30, 2013 at 8:45 PM, Pavel Jbanov [email protected]:

In lib/block.dart:

@@ -297,6 +298,7 @@ class _ComponentFactory {
if (directive.$publishAs != null) {
shadowScope[directive.$publishAs] = controller;
}

  • createAttributeMapping(scope, shadowScope, controller, parser);

This move would break #45#45


Reply to this email directly or view it on GitHubhttps://github.com//pull/61/files#r5495279
.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it has crossed my mind again just now. We already have TemplateLoader which is an attempt to work around same problem. Maybe having an "init" method will make the whole component lifecycle a bit easier to work with.

@mhevery
Copy link
Contributor Author

mhevery commented Aug 13, 2013

MERGED

@mhevery mhevery closed this Aug 13, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants