From 992c790f0786fa45c1cc3710f29bf49c7c322ba7 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Tue, 29 Nov 2011 21:51:59 -0800 Subject: refactor(scope): separate controller from scope Controller is standalone object, created using "new" operator, not messed up with scope anymore. Instead, related scope is injected as $scope. See design proposal: https://docs.google.com/document/pub?id=1SsgVj17ec6tnZEX3ugsvg0rVVR11wTso5Md-RdEmC0k Closes #321 Closes #425 Breaks controller methods are not exported to scope automatically Breaks Scope#$new() does not take controller as argument anymore--- docs/content/guide/dev_guide.expressions.ngdoc | 16 ++--- docs/content/guide/dev_guide.forms.ngdoc | 72 ++++++++++------------ docs/content/guide/dev_guide.overview.ngdoc | 6 +- ..._guide.templates.filters.creating_filters.ngdoc | 4 +- 4 files changed, 47 insertions(+), 51 deletions(-) (limited to 'docs/content/guide') diff --git a/docs/content/guide/dev_guide.expressions.ngdoc b/docs/content/guide/dev_guide.expressions.ngdoc index 4df69d28..b7ecc521 100644 --- a/docs/content/guide/dev_guide.expressions.ngdoc +++ b/docs/content/guide/dev_guide.expressions.ngdoc @@ -51,14 +51,14 @@ You can try evaluating different expressions here:
@@ -282,15 +280,13 @@ This example shows how to implement a custom HTML editor widget in Angular. diff --git a/docs/content/guide/dev_guide.overview.ngdoc b/docs/content/guide/dev_guide.overview.ngdoc index 5d308167..faf40af5 100644 --- a/docs/content/guide/dev_guide.overview.ngdoc +++ b/docs/content/guide/dev_guide.overview.ngdoc @@ -43,9 +43,9 @@ easier a web developer's life can if they're using angular:
diff --git a/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc b/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc index 98b41411..87894227 100644 --- a/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc +++ b/docs/content/guide/dev_guide.templates.filters.creating_filters.ngdoc @@ -34,8 +34,8 @@ text upper-case and assigns color. } }); - function Ctrl() { - this.greeting = 'hello'; + function Ctrl($scope) { + $scope.greeting = 'hello'; } -- cgit v1.2.3