Hi Andrew,
Here is the working jsFiddle:
http://jsfiddle.net/pkozlowski_opensource/7Ha3L/1/
The problem you had was that you were using 'this' while you should be
using '$scope'. What angular can see in templates are objects in
$scope, while 'this' was referring to the controller instance.
Other thing: if you want the word count for name to be updated
dynamically you should use template binding: {{name.split('
').length}}
Also, I've cleaned up your jsFiddle a bit (jsFiddle has a built-in
support for angular now).
Hope this helps,
Pawel
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To post to this group, send email to
ang...@googlegroups.com.
> To unsubscribe from this group, send email to
>
angular+u...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/angular?hl=en.
>
>