私はとMeteorを学ぶために社会的なアプリのチュートリアルを使用しています。私は、私が根本的な原因を見つけることができないという問題に遭遇しました。routeconfigを使用しているときに、 'annotations'のプロパティが未定義です。
私が追加することを述べてtutorialを以下のよ:
RouteConfig
注釈:app.htmlで
@RouteConfig([
{
path: '/',
as: 'PartiesList',
component: PartiesList
}, {
path: '/party/:partyId',
as: 'PartyDetails',
component: PartyDetails
}
]);
router-outlet
:
<router-outlet></router-outlet>
をロードするときに、私はこの例外を取得Chromeのアプリ:
EXCEPTION: Error in /client/app.html:0:0BrowserDomAdapter.logError @
modules.js?hash=12bd683…:59337BrowserDomAdapter.logGroup @ modules.js?
hash=12bd683…:59347ExceptionHandler.call @ modules.js?
hash=12bd683…:48750(anonymous function) @ modules.js?
hash=12bd683…:54194ZoneDelegate.invoke @ modules.js?
hash=12bd683…:107413onInvoke @ modules.js?
hash=12bd683…:54615ZoneDelegate.invoke @ modules.js?
hash=12bd683…:107412Zone.run @ modules.js?
hash=12bd683…:107306NgZoneImpl.runInner @ modules.js?
hash=12bd683…:54646NgZone.run @ modules.js?
hash=12bd683…:54538ApplicationRef_.run @ modules.js?
hash=12bd683…:54183ApplicationRef_.bootstrap @ modules.js?
hash=12bd683…:54205(anonymous function) @ modules.js?
hash=12bd683…:53993(anonymous function) @ meteor.js?
hash=ae8b8af…:1105ZoneDelegate.invoke @ modules.js?
hash=12bd683…:107413onInvoke @ modules.js?
hash=12bd683…:54615ZoneDelegate.invoke @ modules.js?
hash=12bd683…:107412Zone.run
...
modules.js?hash=12bd683…:59337 TypeError: Cannot read property 'annotations'
of undefined
at RouteRegistry.configFromComponent (modules.js?hash=12bd683…:87825)
at new RootRouter (modules.js?hash=12bd683…:87151)
at routerFactory (modules.js?hash=12bd683…:89570)
at ReflectiveInjector_._instantiate (modules.js?hash=12bd683…:50544)
at ReflectiveInjector_._instantiateProvider (modules.js?hash=12bd683…:50473)
at ReflectiveInjector_._new (modules.js?hash=12bd683…:50462)
at ReflectiveInjectorDynamicStrategy.getObjByKeyId (modules.js?hash=12bd683…:50117)
at ReflectiveInjector_._getByKeyDefault (modules.js?hash=12bd683…:50642)
at ReflectiveInjector_._getByKey (modules.js?hash=12bd683…:50614)
at ReflectiveInjector_.get (modules.js?hash=12bd683…:50423)
@RouteConfig
を削除した場合、例外は発生しませんが、コンテンツが表示されないため、何も表示されません。これを引き起こす原因は何ですか?
角度コアパッケージをインストールするには、例えば
:あなたは次の形式を使用できますか?あなたの提案を試みましたが、コンポーネントは解決されていません – mmelsen
新しいルータ3.0.0.a7.7を使用すると、上記で説明した設定でコンポーネントが未定義に戻っているようです。何か案は? – Colum
うん、戻り値は未定義です。 – twilliams