Problem initializing angular dart module

I recently updated angular dart to the latest version [0.13.0]. From this point on, it becomes very difficult to simply initialize the application. I spent about a week fighting this. I am getting this error now:

The dart: html built-in library is not available on stand-alone VMs. 'package: angular / application_factory.dart': error: line 19 pos 1: library handler could not import "dart: html"; ^

Where am I mistaken?

pubspec.yaml

name: abc description: A sample web application dependencies: angular: "0.13.0" browser: any http_server: any route_hierarchical: any web_components: any transformers: - angular 

main.dart

 import 'package:angular/angular.dart'; import 'package:angular/application_factory.dart'; import 'package:abc/main_module.dart'; void main() { applicationFactory() .addModule(new MainModule()) .run(); } 

main_module.dart

 library abc.main_module; import 'package:angular/angular.dart'; import 'package:abc/formatters/capitalize_filter.dart'; import 'package:abc/components/index_controller.dart'; import 'package:abc/router.dart'; class MainModule extends Module { MainModule() { bind(CapitalizeFilter); bind(IndexController); bind(RouteInitializerFn, toValue: MainRouteInitializer); bind(NgRoutingUsePushState, toFactory: (_) => new NgRoutingUsePushState.value(false)); } } 
+5
source share

Source: https://habr.com/ru/post/1200372/


All Articles