From e13d5b56c724f64104fd62ca1ff5ef226778097c Mon Sep 17 00:00:00 2001 From: James deBoer Date: Wed, 8 Jan 2014 09:38:15 -0800 Subject: [PATCH] chore(demos): Delete the obsolete 'books' demo --- demo/README.md | 7 ---- demo/pubspec.yaml | 8 ----- demo/web/book.css | 1 - demo/web/book.html | 9 ----- demo/web/index.html | 31 ---------------- demo/web/main.dart | 82 ------------------------------------------- demo/web/pubspec.yaml | 8 ----- 7 files changed, 146 deletions(-) delete mode 100644 demo/README.md delete mode 100644 demo/pubspec.yaml delete mode 100644 demo/web/book.css delete mode 100644 demo/web/book.html delete mode 100644 demo/web/index.html delete mode 100644 demo/web/main.dart delete mode 100644 demo/web/pubspec.yaml diff --git a/demo/README.md b/demo/README.md deleted file mode 100644 index df2b5a505..000000000 --- a/demo/README.md +++ /dev/null @@ -1,7 +0,0 @@ -A small demo web app demonstrating Angular in Dart. - -To run: - - Generate the packages/ directory by running "pub install" from this directory. - - Navigate to web/index.html in Dartium - -NOTE: This demo does not currently work in dart2js. Dart2js is missing reflection support. diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml deleted file mode 100644 index 05f93e865..000000000 --- a/demo/pubspec.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: angular_dart_demo -version: 0.0.1 -dependencies: - angular: - path: .. - browser: any - js: any - unittest: any diff --git a/demo/web/book.css b/demo/web/book.css deleted file mode 100644 index 58422e184..000000000 --- a/demo/web/book.css +++ /dev/null @@ -1 +0,0 @@ -h2 { color: red } diff --git a/demo/web/book.html b/demo/web/book.html deleted file mode 100644 index 51f1a95d0..000000000 --- a/demo/web/book.html +++ /dev/null @@ -1,9 +0,0 @@ -
Shadow backed template. Greeting from the controller: - - -

Table of Contents

- - -
diff --git a/demo/web/index.html b/demo/web/index.html deleted file mode 100644 index 48fd4731d..000000000 --- a/demo/web/index.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - -
-

ng-model

- - - Hello {{yourName}}! -

A Demo of the Bind Directive

-
-
-
-
- -

A Demo of the Repeat Directive

- - -

A Demo of Components

- - The contents of the first act. - The contents of the second act. - -
- - diff --git a/demo/web/main.dart b/demo/web/main.dart deleted file mode 100644 index d9a1a6060..000000000 --- a/demo/web/main.dart +++ /dev/null @@ -1,82 +0,0 @@ -import 'dart:html' as dom; -import 'dart:math' as math; - -import 'package:angular/angular.dart'; -import 'package:di/di.dart'; - -class BookController { - Scope $scope; - List chapters; - - attach(Scope scope) { - $scope = scope; - - $scope.greeting = 'TabController'; - chapters = []; - $scope.chapters = chapters; - - $scope.selected = (chapterScope) { - chapters.forEach((p) { - p['selected'] = false; - }); - chapterScope['selected'] = true; - }; - } - - addChapter(var chapterScope) { - if (chapters.length == 0) { ($scope.selected)(chapterScope); } - chapters.add(chapterScope); - } -} - -class BookComponent { - BookController controller; - BookComponent(BookController this.controller); - - static String $templateUrl = 'book.html'; - static String $cssUrl = 'book.css'; - - attach(Scope scope) { - controller.attach(scope); - } -} - -class ChapterDirective { - BookController controller; - dom.Element element; - ChapterDirective(dom.Element this.element, BookController this.controller); - - attach(Scope scope) { - // automatic scope management isn't implemented yet. - var child = scope.$new(); - child.title = element.attributes['title']; - controller.addChapter(child); - } -} - -@NgDirective( - selector: '[main-controller]' -) -class MainController { - - String _random = 'Random: ${new math.Random().nextInt(100)}'; - - MainController(Scope scope) { - scope['greeting'] = 'Hello world!'; - scope['people'] = ['James', 'Misko']; - scope['objs'] = [{'v': 'v1'}, {'v': 'v2'}]; - scope['random'] = () { - return _random; - }; - } -} - -main() { - // Set up the Angular directives. - var module = new Module() - ..type(BookComponent) - ..type(ChapterDirective) - ..type(MainController); - - ngBootstrap(module:module); -} diff --git a/demo/web/pubspec.yaml b/demo/web/pubspec.yaml deleted file mode 100644 index 8d4d4fc73..000000000 --- a/demo/web/pubspec.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: angular_dart_demo -version: 0.0.1 -dependencies: - angular: - path: ../.. - browser: any - js: any - unittest: any