Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(template-syntax): clarify context discussions #996

Closed
wants to merge 1 commit into from

Conversation

kwalrath
Copy link
Contributor

This PR is based on text provided by @montyr75.

Unfortunately, the diffs are hard to read, so I'm attaching pics of the rendered text.

TS expression context:
image

Dart expression context:
image

TS statement context:
image

Dart statement context:
image

@montyr75
@wardbell

@montyr75
Copy link

I like it! This version will be much clearer for Dart devs.

@wardbell
Copy link
Contributor

LGTM

@kwalrath kwalrath closed this in d02d098 Mar 21, 2016
@kwalrath kwalrath deleted the template-syntax-montyr branch March 21, 2016 21:53
@zoechi
Copy link

zoechi commented Mar 22, 2016

What about explicitly mention how to work around? Like a getter or function in the component that forwards to a global member?.

@Component(
  selector: 'my-component',
  template: '<button (click)="log('been clicked')">click me</button>')
class MyComponent {
  log(String value) => print(value);
}

Not sure if this is obvious for everyone.

@montyr75
Copy link

It's subtle, but I did imply that in the very last sentence: "They can't directly call print..."

But yes, if you wanted to be an overachiever, you could explicitly mention workarounds.

@zoechi
Copy link

zoechi commented Mar 22, 2016

:D You don't want to be an overachiver?
I just saw a few questions on SO and Gitter where people were wondering what's a valid way to do it. My example above seems to come to mind easily for them as well, but they keep wondering if this is the way to go or if they missed something. With an explicit pointer these doubts would vanish.

@montyr75
Copy link

I like to overachieve, yes, but this is Kathy's call. :)

I agree that it would be helpful.

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

Successfully merging this pull request may close these issues.

5 participants