Custom directive - binding variable to scope in latest release

Showing 1-6 of 6 messages
Custom directive - binding variable to scope in latest release bsr 6/20/12 8:18 PM
Hello.

I was following tutorial on directive
by John Lindquist. It works with angular-1.0.0rc5.js, but throws exception with 1.0 release.
Looks like the way binding the variable is changed. I couldn't really follow the manual.

thanks in advance.

angular.module('components',[])
.directive('helloWorld', function(){
return{
restrict: 'E',
scope:{
name: 'bind',
},
template: '<span>Hello {{name}}..</span>'
}
});

angular.module('HelloApp', ['components'])

Error: Invalid isolate scope definition for directive helloWorld: bind
    at Error (unknown source)
    at file:///test/directive3/js/angular.js:4177:23
    at forEach (file:///test/directive3/js/angular.js:117:20)
Re: Custom directive - binding variable to scope in latest release Jeff Austin 6/20/12 8:26 PM
Yes, it's been updated. Check the recently updated docs:

http://docs.angularjs.org/guide/directive

Now you should use "@", "=", or "&"

For example:

scope {
     name:"@"
Re: [angular.js] Re: Custom directive - binding variable to scope in latest release John Lindquist 6/20/12 9:41 PM
Thanks for pointing that out, I need to go back and add some popups or something to the video.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/-OEpzzWNUl0J.

To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.

Re: [angular.js] Re: Custom directive - binding variable to scope in latest release Mark Holtzhausen 7/13/12 4:46 AM
Even though that have been changed in the docs, the example just above the "Creating Components" heading still has the wrong scope declarations.
Re: Custom directive - binding variable to scope in latest release jan.dr...@gmail.com 12/20/12 5:29 AM
Where in the documentation does it say to use  "@", "=", or "&" for binding? 
Re: Custom directive - binding variable to scope in latest release jan.dr...@gmail.com 12/20/12 5:30 AM
never mind I found it.