Skip to content

Can't set any isolate scope properties #9

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

Closed
azevedo opened this issue Jan 12, 2016 · 9 comments
Closed

Can't set any isolate scope properties #9

azevedo opened this issue Jan 12, 2016 · 9 comments

Comments

@azevedo
Copy link

azevedo commented Jan 12, 2016

The latest commit makes it impossible to set any isolate scope properties, as it is not extendable anymore.

@azevedo azevedo changed the title Can't set any scope properties Can't set any isolate scope properties Jan 12, 2016
@menems
Copy link

menems commented Jan 12, 2016

#8 related

You replace the name as controllerAs by '$ctrl', why ?
so now we have to explicitly add controllerAs ...

@benoror
Copy link
Contributor

benoror commented Jan 12, 2016

angular/angular.js#13710 cc @azevedo-252 @menems

@azevedo
Copy link
Author

azevedo commented Jan 12, 2016

@menems I understand that, and the issue is not about that feature in particular.
What I mean is that we can no longer set isolate scope properties with the bindings property, like so

angular
.module('app', [])
.component('counter', {
  bindings: {
    count: '='
  },
  ...
});

because it no longer maps it to the real scope property of the DDO. What you get in the end is something like:

angular
.module('app', [])
.directive('counter', {
  scope: {}, // notice `count` is missing
  ...
});

This is the change that causes this. It doesn't assign options.bindings anywhere.

@toddmotto
Copy link
Owner

@azevedo-252 You okay to test last commit on master? :)

@toddmotto
Copy link
Owner

Latest changes should mirror the new 1.5 syntax:

scope: options.bindings || {},
bindToController: !!options.bindings,

Set scope: { foo: '=' } or scope: {} and bindToController: [Boolean]. That way it works on 1.3 still.

@toddmotto
Copy link
Owner

@benoror If the last commit fixes, then 0.0.3 is good to go on npm

@azevedo
Copy link
Author

azevedo commented Jan 12, 2016

@toddmotto it's working
👍

@toddmotto
Copy link
Owner

@azevedo-252 Awesome, thanks! :)

@benoror
Copy link
Contributor

benoror commented Jan 12, 2016

npm publish'ed 👍

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

4 participants