AngularDart
Guide
https://webdev.dartlang.org/angular/guide/component-styles
https://webdev.dartlang.org/angular/tutorial/toh-pt6
angular_components
Official Example: https://github.com/dart-lang/angular_components/tree/master/examples
Lib: https://webdev.dartlang.org/api/angular/angular/NgClass-class
Components
Directive
ngClass: https://webdev.dartlang.org/api/angular/angular/NgClass-class
Cheat Sheet
https://webdev.dartlang.org/angular/cheatsheet
Debug
https://webdev.dartlang.org/guides/debugging
Git hook
-
Create
pre-commit
file in.git/hooks
-
Remember to change the access permissions: ` chmod +x pre-commit`
-
pre-commit
file: -
dart_files=$(git diff --cached --name-only --diff-filter=ACM | grep '.dart$') [ -z "$dart_files" ] && exit 0 function checkfmt() { unformatted=$(dartfmt -n $dart_files) [ -z "$unformatted" ] && return 0 echo >&2 "Dart files must be formatted with dartfmt. Please run:" for fn in $unformatted; do echo >&2 " dartfmt -w $PWD/$fn" done return 1 } checkfmt || fail=yes [ -z "$fail" ] || exit 1 echo 'all okay?' exit 0
Run with Https
Dev code
cd ~/Documents/workspaceUfirst/QFirst/qfirst_web && webdev serve --auto=refresh --tls-cert-chain /Users/shi/Documents/workspaceUfirst/server.crt --tls-cert-key /Users/shi/Documents/workspaceUfirst/server.key
Release code
cd ~/Documents/workspaceUfirst/QFirst/qfirst_web && webdev serve --auto=refresh --release --tls-cert-chain /Users/shi/Documents/workspaceUfirst/server.crt --tls-cert-key /Users/shi/Documents/workspaceUfirst/server.key
Official site
https://webdev.dartlang.org/angular
Example Code
https://github.com/angular-examples/lottery