2016-05-05 12 views
1

このエラーが表示されたら、何が間違っているのかわかりません。コードは同じで、Angular 2 Beta 17で動作しました。数回。Angular2 RC1 "No Directive注釈が見つかりました"

ERROR

EXCEPTION: No Directive annotation found on AWebAppComponent 
browser_adapter.ts:78EXCEPTION: No Directive annotation found on AWebAppComponentBrowserDomAdapter.logError @ browser_adapter.ts:78BrowserDomAdapter.logGroup @ browser_adapter.ts:89ExceptionHandler.call @ exception_handler.ts:53(anonymous function) @ application_ref.ts:345ZoneDelegate.invoke @ angular2-polyfills.js:349NgZoneImpl.inner.inner.fork.onInvoke @ ng_zone_impl.ts:67ZoneDelegate.invoke @ angular2-polyfills.js:348Zone.run @ angular2-polyfills.js:242NgZoneImpl.runInner @ ng_zone_impl.ts:99NgZone.run @ ng_zone.ts:210ApplicationRef_.run @ application_ref.ts:335coreLoadAndBootstrap @ application_ref.ts:101bootstrap @ platform_browser_dynamic.ts:105execute @ init.ts:15ensureEvaluated @ system.src.js:3317execute @ system.src.js:3435doDynamicExecute @ system.src.js:798link @ system.src.js:1000doLink @ system.src.js:652updateLinkSetOnLoad @ system.src.js:700(anonymous function) @ system.src.js:512ZoneDelegate.invoke @ angular2-polyfills.js:349Zone.run @ angular2-polyfills.js:242(anonymous function) @ angular2-polyfills.js:597ZoneDelegate.invokeTask @ angular2-polyfills.js:382Zone.runTask @ angular2-polyfills.js:282drainMicroTaskQueue @ angular2-polyfills.js:500ZoneTask.invoke @ angular2-polyfills.js:452 
browser_adapter.ts:78STACKTRACE:BrowserDomAdapter.logError @ browser_adapter.ts:78ExceptionHandler.call @ exception_handler.ts:56(anonymous function) @ application_ref.ts:345ZoneDelegate.invoke @ angular2-polyfills.js:349NgZoneImpl.inner.inner.fork.onInvoke @ ng_zone_impl.ts:67ZoneDelegate.invoke @ angular2-polyfills.js:348Zone.run @ angular2-polyfills.js:242NgZoneImpl.runInner @ ng_zone_impl.ts:99NgZone.run @ ng_zone.ts:210ApplicationRef_.run @ application_ref.ts:335coreLoadAndBootstrap @ application_ref.ts:101bootstrap @ platform_browser_dynamic.ts:105execute @ init.ts:15ensureEvaluated @ system.src.js:3317execute @ system.src.js:3435doDynamicExecute @ system.src.js:798link @ system.src.js:1000doLink @ system.src.js:652updateLinkSetOnLoad @ system.src.js:700(anonymous function) @ system.src.js:512ZoneDelegate.invoke @ angular2-polyfills.js:349Zone.run @ angular2-polyfills.js:242(anonymous function) @ angular2-polyfills.js:597ZoneDelegate.invokeTask @ angular2-polyfills.js:382Zone.runTask @ angular2-polyfills.js:282drainMicroTaskQueue @ angular2-polyfills.js:500ZoneTask.invoke @ angular2-polyfills.js:452 
browser_adapter.ts:78Error: No Directive annotation found on AWebAppComponent 
    at new BaseException (exceptions.ts:14) 
    at DirectiveResolver.resolve (directive_resolver.ts:54) 
    at CompileMetadataResolver.getDirectiveMetadata (metadata_resolver.ts:82) 
    at RuntimeCompiler.resolveComponent (runtime_compiler.ts:51) 
    at eval (application_ref.ts:104) 
    at eval (application_ref.ts:337) 
    at ZoneDelegate.invoke (angular2-polyfills.js:349) 
    at Object.NgZoneImpl.inner.inner.fork.onInvoke (ng_zone_impl.ts:67) 
    at ZoneDelegate.invoke (angular2-polyfills.js:348) 
    at Zone.run (angular2-polyfills.js:242)BrowserDomAdapter.logError @ browser_adapter.ts:78ExceptionHandler.call @ exception_handler.ts:57(anonymous function) @ application_ref.ts:345ZoneDelegate.invoke @ angular2-polyfills.js:349NgZoneImpl.inner.inner.fork.onInvoke @ ng_zone_impl.ts:67ZoneDelegate.invoke @ angular2-polyfills.js:348Zone.run @ angular2-polyfills.js:242NgZoneImpl.runInner @ ng_zone_impl.ts:99NgZone.run @ ng_zone.ts:210ApplicationRef_.run @ application_ref.ts:335coreLoadAndBootstrap @ application_ref.ts:101bootstrap @ platform_browser_dynamic.ts:105execute @ init.ts:15ensureEvaluated @ system.src.js:3317execute @ system.src.js:3435doDynamicExecute @ system.src.js:798link @ system.src.js:1000doLink @ system.src.js:652updateLinkSetOnLoad @ system.src.js:700(anonymous function) @ system.src.js:512ZoneDelegate.invoke @ angular2-polyfills.js:349Zone.run @ angular2-polyfills.js:242(anonymous function) @ angular2-polyfills.js:597ZoneDelegate.invokeTask @ angular2-polyfills.js:382Zone.runTask @ angular2-polyfills.js:282drainMicroTaskQueue @ angular2-polyfills.js:500ZoneTask.invoke @ angular2-polyfills.js:452 
angular2-polyfills.js:349 Error: Error: No Directive annotation found on AWebAppComponent(…) 
+0

このエラーが発生している場所の関連コードを含めてください – Austin

答えて

1

問題は、私はすべてのインポート文を置き換えるものではありませんでしたということでした。

このエラーは、インポートが正しくない場合に発生します。

インポートを修正しました。

+0

インポートに間違いがありましたか?私は同じ問題を抱えていると思います。 –

+0

ちょうどすべて正しく入力していない、thats all。 – Teddy

関連する問題