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

bindToController should support "scope" syntax/features #10420

Closed
johnlindquist opened this Issue Dec 11, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@johnlindquist
Contributor

johnlindquist commented Dec 11, 2014

currently, if you want to use "bindToController", you have to do this:

bindToController: true,
scope: {
message: "@"
}

to simplify, bindToController should support the scope syntax and automatically set to true:

bindToController: {
message: "@"
}

This helps explain what is actually happening and simplifies your code so it should be a simple win/win.

@lgalfaso

This comment has been minimized.

Show comment
Hide comment
@lgalfaso

lgalfaso Dec 15, 2014

Member

this looks reasonable, will mark it for 1.4.x and see what is the community feedback on this

Member

lgalfaso commented Dec 15, 2014

this looks reasonable, will mark it for 1.4.x and see what is the community feedback on this

caitp added a commit to caitp/angular.js that referenced this issue Dec 15, 2014

feat($compile): allow using bindToController as object, support both …
…new/isolate scopes

bindToController is now able to be specified as a convenient object notation:

```
bindToController: {
  text: '@text',
  obj: '=obj',
  expr: '&expr'
},
scope: {}
```

It can also be used in conjunction with new scopes, rather than exclusively isolate scopes:

```
bindToController: {
  text: '@text',
  obj: '=obj',
  expr: '&expr'
},
scope: true
```

Closes #10420

caitp added a commit to caitp/angular.js that referenced this issue Dec 15, 2014

feat($compile): allow using bindToController as object, support both …
…new/isolate scopes

bindToController is now able to be specified as a convenient object notation:

```
bindToController: {
  text: '@text',
  obj: '=obj',
  expr: '&expr'
},
scope: {}
```

It can also be used in conjunction with new scopes, rather than exclusively isolate scopes:

```
bindToController: {
  text: '@text',
  obj: '=obj',
  expr: '&expr'
},
scope: true
```

Closes #10420

caitp added a commit to caitp/angular.js that referenced this issue Jan 19, 2015

feat($compile): allow using bindToController as object, support both …
…new/isolate scopes

bindToController is now able to be specified as a convenient object notation:

```
bindToController: {
  text: '@text',
  obj: '=obj',
  expr: '&expr'
},
scope: {}
```

It can also be used in conjunction with new scopes, rather than exclusively isolate scopes:

```
bindToController: {
  text: '@text',
  obj: '=obj',
  expr: '&expr'
},
scope: true
```

Closes #10420

caitp added a commit to caitp/angular.js that referenced this issue Jan 27, 2015

feat($compile): allow using bindToController as object, support both …
…new/isolate scopes

bindToController is now able to be specified as a convenient object notation:

```
bindToController: {
  text: '@text',
  obj: '=obj',
  expr: '&expr'
},
scope: {}
```

It can also be used in conjunction with new scopes, rather than exclusively isolate scopes:

```
bindToController: {
  text: '@text',
  obj: '=obj',
  expr: '&expr'
},
scope: true
```

Closes #10420

caitp added a commit to caitp/angular.js that referenced this issue Jan 29, 2015

feat($compile): allow using bindToController as object, support both …
…new/isolate scopes

bindToController is now able to be specified as a convenient object notation:

```
bindToController: {
  text: '@text',
  obj: '=obj',
  expr: '&expr'
},
scope: {}
```

It can also be used in conjunction with new scopes, rather than exclusively isolate scopes:

```
bindToController: {
  text: '@text',
  obj: '=obj',
  expr: '&expr'
},
scope: true
```

Closes #10420

@caitp caitp closed this in 35498d7 Jan 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment