#dartlang
class MyAppModule extends Module {
MyAppModule() {
type(RecipeBookController);
}
}
!
main() {
ngBootstrap(module: new MyAppModule());
}
main.dart
Slide 22
Slide 22 text
#dartlang
Components
Slide 23
Slide 23 text
#dartlang
index.html
Slide 24
Slide 24 text
“
”
#dartlang
Eric Bidelman
Shadow DOM gives us markup encapsulation,
style boundaries, and exposes (to web
developers) the same mechanics browsers
vendors have been using to implement their
internal UI.
Shadow DOM
#dartlang
@NgController
!
Application-specific logic
Example: recipe-book
!
@NgComponent
!
Custom elements
Example: rating
!
@NgDirective
!
Decorator that adds logic to existing elements
Examples: tooltip, ng-class
Slide 30
Slide 30 text
#dartlang
Filters
Slide 31
Slide 31 text
#dartlang
{{ name }}
index.html
Slide 32
Slide 32 text
#dartlang
@NgFilter(name: 'categoryfilter')
class CategoryFilter {
call(recipeList, filterMap) {
if (recipeList is List && filterMap is Map) {
// filter for something here
return recipeList.toList();
}
}
}
category_filter.dart
Slide 33
Slide 33 text
#dartlang
{{ name }}
index.html
Slide 34
Slide 34 text
#dartlang
Services
Slide 35
Slide 35 text
Services
#dartlang
!
Services are substitutable objects that are wired together
using dependency injection. You can use services to organize
and share code across your app.
!
!
Angular for example provides a built-in service called the
Http Service that handles making HTTP requests to the
server.
!
!
Resources
#dartlang
Siblings
https://www.flickr.com/photos/swambo/13830270395
Building Blocks
https://www.flickr.com/photos/tinker-tailor/4161713573
Blueprint
https://www.flickr.com/photos/wscullin/3770015203
Construction Site
http://commons.wikimedia.org/wiki/File:QV_Building_construction_site,_Melbourne_-
_March_2002.jpg