1
내 구성 요소에서 RouteData를 수신하려고하지만 예상대로 작동하지 않습니다. 내가받은 메시지는 다음과 같습니다 ORIGINAL EXCEPTION: Invalid argument(s): No provider found for RouteData.
AngularDart RouteData not available
Pubspec.yaml :
dependencies:
angular: ^4.0.0
angular_components: ^0.8.0
angular_router: ^1.0.2
main.dart :
void main() {
bootstrap(AppComponent, [
ROUTER_PROVIDERS,
const Provider(LocationStrategy, useClass: HashLocationStrategy),
]);
}
내 구성 요소 :
@RouteConfig(
const [
const Route(
path: '/',
name: 'Home',
component: HomeComponent,
useAsDefault: true,
data: const {
'title': 'Page Title',
}),
],
)
class AppComponent {
final Router _router;
final RouteData _routeData;
AppComponent(this._router, this._routeData);
}
내가 분명 해요 것이 있습니다 잘못하고있는거야?
아 ... 이해합니다. 감사! – Aaron