Routing in angular2 with Dart

I'm new to Angular2, so far I have managed to write 5 Min Quickstart .

I want to learn how to use routing in Angular2 and Dart , unfortunately, I have not found a single example on the Internet. most articles talk about routing with typescript, which I could not get to work with the dart.

I am using webstorm with the dart plugin.

import 'dart:html';
import 'package:angular2/angular2.dart';
import 'package:angular2/bootstrap.dart';
import 'package:angular2/router.dart';

@Component(selector: 'my-app', template: '<h1>My First Angular 2 App</h1>')
class AppComponent {}

void main() {
  bootstrap(AppComponent);
}
+4
source share
2 answers

Try this HashLocationStrategy example.

https://github.com/ng2-dart-samples/todomvc

+4
source

, .

+2

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


All Articles