我正在使用ng2-bootstrap在angular2 beta 9中正常工作。今天我已将angular2更新为beta 11版本。现在我正面临这个问题
EXCEPTION: Error: Uncaught (in promise): No Directive annotation found on Accordion
browser_adapter.js:76 EXCEPTION: Error: Uncaught (in promise): No Directive annotation found on AccordionBrowserDomAdapter.logError @ browser_adapter.js:76BrowserDomAdapter.logGroup @ browser_adapter.js:86ExceptionHandler.call @ exception_handler.js:56(anonymous function) @ application_ref.js:193schedulerFn @ async.js:122SafeSubscriber.__tryOrUnsub @ Subscriber.js:166SafeSubscriber.next @ Subscriber.js:115Subscriber._next @ Subscriber.js:74Subscriber.next @ Subscriber.js:51Subject._finalNext @ Subject.js:124Subject._next @ Subject.js:116Subject.next @ Subject.js:73EventEmitter.emit @ async.js:111NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ ng_zone.js:119NgZoneImpl.inner.inner.fork.onHandleError @ ng_zone_impl.js:65ZoneDelegate.handleError @ angular2-polyfills.js:326Zone.runGuarded @ angular2-polyfills.js:235drainMicroTaskQueue @ angular2-polyfills.js:486ZoneTask.invoke @ angular2-polyfills.js:425
browser_adapter.js:76 STACKTRACE:BrowserDomAdapter.logError @ browser_adapter.js:76ExceptionHandler.call @ exception_handler.js:58(anonymous function) @ application_ref.js:193schedulerFn @ async.js:122SafeSubscriber.__tryOrUnsub @ Subscriber.js:166SafeSubscriber.next @ Subscriber.js:115Subscriber._next @ Subscriber.js:74Subscriber.next @ Subscriber.js:51Subject._finalNext @ Subject.js:124Subject._next @ Subject.js:116Subject.next @ Subject.js:73EventEmitter.emit @ async.js:111NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ ng_zone.js:119NgZoneImpl.inner.inner.fork.onHandleError @ ng_zone_impl.js:65ZoneDelegate.handleError @ angular2-polyfills.js:326Zone.runGuarded @ angular2-polyfills.js:235drainMicroTaskQueue @ angular2-polyfills.js:486ZoneTask.invoke @ angular2-polyfills.js:425
browser_adapter.js:76 Error: Uncaught (in promise): No Directive annotation found on Accordion
at resolvePromise (angular2-polyfills.js:534)
at angular2-polyfills.js:511
at ZoneDelegate.invoke (angular2-polyfills.js:322)
at Object.NgZoneImpl.inner.inner.fork.onInvoke (ng_zone_impl.js:44)
at ZoneDelegate.invoke (angular2-polyfills.js:321)
at Zone.run (angular2-polyfills.js:218)
at angular2-polyfills.js:567
at ZoneDelegate.invokeTask (angular2-polyfills.js:355)
at Object.NgZoneImpl.inner.inner.fork.onInvokeTask (ng_zone_impl.js:35)
at ZoneDelegate.invokeTask (angular2-polyfills.js:354)
如何解决这个问题?
答案 0 :(得分:0)
它的工作!某些组件可能存在一些问题(但我不知道)。
的 Working demo 强>
<强>的index.html 强>
...
...
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/2.0.0-beta.11/angular2-polyfills.min.js"></script>
<script src="https://rawgithub.com/systemjs/systemjs/0.19.6/dist/system.js"></script>
<script src="https://code.angularjs.org/tools/typescript.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/2.0.0-beta.11/Rx.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/2.0.0-beta.11/angular2.dev.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/2.0.0-beta.11/router.dev.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/2.0.0-beta.11/http.dev.js"></script>
...
...