Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ilikerobots/96de330694eef29f5f602cf9ecbae6b7 to your computer and use it in GitHub Desktop.
Save ilikerobots/96de330694eef29f5f602cf9ecbae6b7 to your computer and use it in GitHub Desktop.
import 'package:angular2/core.dart';
import 'package:angular2/router.dart';
@Component(
selector: 'my-player-detail',
template: '''<h2>Player Detail</h2> <h3>{{player}}</h3>''',
)
class PlayerDetailComponent implements OnInit {
final RouteParams _routeParams;
String player = "Not selected";
PlayerDetailComponent(this._routeParams);
void ngOnInit() {
player = _routeParams.get('id');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment