Dart
Install angular_ts, create a typed Dart component, and load it with the matching AngularTS runtime.
The angular_ts package gives Dart code typed access to AngularTS modules,
injection, components, directives, services, and scopes.
Install
Add the facade and Web API package:
dart pub add angular_ts web
Compile the entry point:
dart compile js web/main.dart -o web/main.dart.js
Load @angular-wave/angular.ts before main.dart.js, keep both packages on the
same version, and serve the page over HTTP. The package
page contains a complete first component.
Guidance
- Use typed tokens and
inject0throughinject8for dependencies. - Expose template-facing controllers with
@JSExport()andcreateJSInteropWrapper(). - Keep JavaScript conversion at the edge of the application.
- Test the compiled JavaScript in a real page.
Complete example
Use integrations/dart/example/basic_app as a complete todo project, or browse
all integration examples.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.