I recently upgraded angular dart to the recent version [0.13.0]. From then onward it is becoming very difficult just to initialize the application. I have spent around a week fighting with this. I get this error currently:
The built-in library 'dart:html' is not available on the stand-alone VM. 'package:angular/application_factory.dart': error: line 19 pos 1: library handler failed import 'dart:html'; ^
where do I go wrong?
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));
}
}