bindToController should support "scope" syntax/features #10420

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

Projects

None yet

2 participants

@johnlindquist
Member

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 lgalfaso added this to the 1.4.x milestone Dec 15, 2014
@lgalfaso
Member

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

@caitp caitp added a commit to caitp/angular.js that referenced this issue Dec 15, 2014
@caitp caitp 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
9a97d4b
@caitp caitp added a commit to caitp/angular.js that referenced this issue Dec 15, 2014
@caitp caitp 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
7e77e03
@caitp caitp added a commit to caitp/angular.js that referenced this issue Jan 19, 2015
@caitp caitp 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
1838d75
@caitp caitp added a commit to caitp/angular.js that referenced this issue Jan 27, 2015
@caitp caitp 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
440cd41
@caitp caitp added a commit to caitp/angular.js that referenced this issue Jan 29, 2015
@caitp caitp 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
ee11ced
@caitp caitp added a commit that closed this issue Jan 29, 2015
@caitp caitp 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
Closes #10467
35498d7
@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