From e5d5a576af1aaf74549a1aa746648ee271423105 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 10 Feb 2014 10:27:59 -0600 Subject: [PATCH] Chap 6 previous chap made consistent & follow Dart Style Guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Chap 6 index.html: some unnecessary differences with chapter 5’s index.html have been eliminated. - Added types on public class members to follow the Dart Style Guide. - Removed whitespace from chap 5 files to eliminate unnecessary differences with chap 6 files. - Minor edit to chap 3 & 4 index.html to only show “Recipe Details” heading when a recipe is being shown. This is more consistent with the app behavior of chap 6 (which renders the recipe details via a completely self-contained view). --- Chapter_03/web/index.html | 2 +- Chapter_04/web/index.html | 2 +- Chapter_05/web/index.html | 2 +- Chapter_05/web/main.dart | 1 - Chapter_06/lib/component/search_recipe_component.dart | 4 ++-- Chapter_06/lib/component/view_recipe_component.dart | 2 +- Chapter_06/lib/component/view_recipe_component.html | 2 +- Chapter_06/lib/recipe_book.dart | 8 ++++---- Chapter_06/web/index.html | 8 ++------ 9 files changed, 13 insertions(+), 18 deletions(-) diff --git a/Chapter_03/web/index.html b/Chapter_03/web/index.html index 6ad2c48..d52f60d 100644 --- a/Chapter_03/web/index.html +++ b/Chapter_03/web/index.html @@ -17,8 +17,8 @@

Recipe List

-

Recipe Details

+

Recipe Details

Name: {{ctrl.selectedRecipe.name}}
Category: {{ctrl.selectedRecipe.category}}
Rating: diff --git a/Chapter_04/web/index.html b/Chapter_04/web/index.html index dcaf581..85775d2 100644 --- a/Chapter_04/web/index.html +++ b/Chapter_04/web/index.html @@ -19,8 +19,8 @@

Recipe List

-

Recipe Details

+

Recipe Details

Name: {{ctrl.selectedRecipe.name}}
Category: {{ctrl.selectedRecipe.category}}
Rating: diff --git a/Chapter_05/web/index.html b/Chapter_05/web/index.html index f84e131..ed339af 100644 --- a/Chapter_05/web/index.html +++ b/Chapter_05/web/index.html @@ -5,7 +5,7 @@ - +
{{ctrl.message}} diff --git a/Chapter_05/web/main.dart b/Chapter_05/web/main.dart index a220a66..208cb79 100644 --- a/Chapter_05/web/main.dart +++ b/Chapter_05/web/main.dart @@ -28,4 +28,3 @@ class MyAppModule extends Module { main() { ngBootstrap(module: new MyAppModule()); } - diff --git a/Chapter_06/lib/component/search_recipe_component.dart b/Chapter_06/lib/component/search_recipe_component.dart index 2231b2e..0fb4e1e 100644 --- a/Chapter_06/lib/component/search_recipe_component.dart +++ b/Chapter_06/lib/component/search_recipe_component.dart @@ -12,9 +12,9 @@ class SearchRecipeComponent { String nameFilterString = ""; @NgTwoWay('category-filter-map') - Map categoryFilterMap; + Map categoryFilterMap; - get categories { + List get categories { return categoryFilterMap.keys.toList(); } diff --git a/Chapter_06/lib/component/view_recipe_component.dart b/Chapter_06/lib/component/view_recipe_component.dart index e04d830..9b840da 100644 --- a/Chapter_06/lib/component/view_recipe_component.dart +++ b/Chapter_06/lib/component/view_recipe_component.dart @@ -15,7 +15,7 @@ class ViewRecipeComponent { String _recipeId; - get recipe { + Recipe get recipe { return recipeMap[_recipeId]; } diff --git a/Chapter_06/lib/component/view_recipe_component.html b/Chapter_06/lib/component/view_recipe_component.html index 1052f84..61e5f99 100644 --- a/Chapter_06/lib/component/view_recipe_component.html +++ b/Chapter_06/lib/component/view_recipe_component.html @@ -1,4 +1,4 @@ -
+