route 0.4.2 copy "route: ^0.4.2" to clipboard
route: ^0.4.2 copied to clipboard

discontinued
outdated

A client + server routing library for Dart

example/example.dart

library example;

import 'dart:html';
import 'package:route/client.dart';

final one = new UrlPattern('/one');
final two = new UrlPattern('/two');

main() {
  query('#warning').remove();
  query('#one').classes.add('selected');
  
  var router = new Router()
    ..addHandler(one, showOne)
    ..addHandler(two, showTwo)
    ..listen();
}

void showOne(String path) {
  print("showOne");
  query('#one').classes.add('selected');
  query('#two').classes.remove('selected');
}

void showTwo(String path) {
  print("showTwo");
  query('#one').classes.remove('selected');
  query('#two').classes.add('selected');
}
0
likes
0
pub points
30%
popularity

Publisher

unverified uploader

A client + server routing library for Dart

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

browser, logging

More

Packages that depend on route