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/api/angular.inputType.ngdoc | 16 ++--- docs/content/cookbook/advancedform.ngdoc | 61 +++++++++-------- docs/content/cookbook/deeplinking.ngdoc | 46 ++++++------- docs/content/cookbook/form.ngdoc | 18 ++--- docs/content/cookbook/helloworld.ngdoc | 4 +- docs/content/cookbook/mvc.ngdoc | 77 +++++++++++----------- 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 +- 10 files changed, 157 insertions(+), 163 deletions(-) (limited to 'docs/content') diff --git a/docs/content/api/angular.inputType.ngdoc b/docs/content/api/angular.inputType.ngdoc index 76a907d1..bfd5fe6f 100644 --- a/docs/content/api/angular.inputType.ngdoc +++ b/docs/content/api/angular.inputType.ngdoc @@ -40,8 +40,8 @@ All `inputType` widgets support:
diff --git a/docs/content/cookbook/advancedform.ngdoc b/docs/content/cookbook/advancedform.ngdoc index e973e30f..58a8dfd5 100644 --- a/docs/content/cookbook/advancedform.ngdoc +++ b/docs/content/cookbook/advancedform.ngdoc @@ -8,10 +8,8 @@ detection, and preventing invalid form submission.
@@ -91,8 +91,7 @@ detection, and preventing invalid form submission.
Debug View: -
form={{form}}
-   master={{master}}
+
form={{form}}
diff --git a/docs/content/cookbook/deeplinking.ngdoc b/docs/content/cookbook/deeplinking.ngdoc index 2ef3da4a..a4dc3a9b 100644 --- a/docs/content/cookbook/deeplinking.ngdoc +++ b/docs/content/cookbook/deeplinking.ngdoc @@ -39,42 +39,38 @@ The two partials are defined in the following URLs:

Your App Chrome

diff --git a/docs/content/cookbook/form.ngdoc b/docs/content/cookbook/form.ngdoc index 80c23e94..9371da7a 100644 --- a/docs/content/cookbook/form.ngdoc +++ b/docs/content/cookbook/form.ngdoc @@ -10,23 +10,23 @@ allow a user to enter data.
diff --git a/docs/content/cookbook/mvc.ngdoc b/docs/content/cookbook/mvc.ngdoc index f566a541..71e771bd 100644 --- a/docs/content/cookbook/mvc.ngdoc +++ b/docs/content/cookbook/mvc.ngdoc @@ -14,9 +14,8 @@ no connection between the controller and the view.

Tic-Tac-Toe

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