2017-01-17 15 views
0

OS?Onsen ui + this._content_.showを与える角2は関数エラーではありません

Linuxのミント18.1

バージョン。

angular-cli: 1.0.0-beta.24 
node: 7.4.0 
os: linux x64 
@angular/common: 2.4.3 
@angular/compiler: 2.4.3 
@angular/core: 2.4.3 
@angular/forms: 2.4.3 
@angular/http: 2.4.3 
@angular/platform-browser: 2.4.3 
@angular/platform-browser-dynamic: 2.4.3 
@angular/router: 3.4.3 
@angular/compiler-cli: 2.4.3 

再現手順。

これはCLIを使用して作成されていないアプリですか?あなたのコードで何を変更しましたか? 私自身の角型アプリケーションでonsen-splitterタグhttps://onsen.io/v2/docs/angular2/ons-splitter-content.htmlを実装したいと思います。分割される2つのコンポーネントを1つのファイルにインポートし、そのファイルをNgModuleとしてインポートしました。ですから、角型アプリケーションを実行すると、コンソールは最初に私にこの問題#3975に対応するエラーを与えました。だから問題を解決するために示唆したように、私は角度のあるプロジェクトフォルダの中にnpm install --save [email protected]というコマンドを出しました。 entryComponentフィールドと同様に、宣言にcontentComponentとsidePageComponetの両方を含めると、解決策が見つからない新しいエラーが発生しています。

ログは失敗によって与えられます。このチュートリアル、スプリッタ・チュートリアルにおいて

EXCEPTION: this._content._show is not a function 
ErrorHandler.handleError @ error_handler.js:50 
next @ application_ref.js:346 
schedulerFn @ async.js:91 
SafeSubscriber.__tryOrUnsub @ Subscriber.js:223 
SafeSubscriber.next @ Subscriber.js:172 
Subscriber._next @ Subscriber.js:125 
Subscriber.next @ Subscriber.js:89 
Subject.next @ Subject.js:55 
EventEmitter.emit @ async.js:77 
NgZone.triggerError @ ng_zone.js:329 
onHandleError @ ng_zone.js:290 
ZoneDelegate.handleError @ zone.js:246 
Zone.runTask @ zone.js:154 
ZoneTask.invoke @ zone.js:345 
data.args.(anonymous function) @ zone.js:1224 
(anonymous) @ setImmediate.js:48 
runIfPresent @ setImmediate.js:67 
onGlobalMessage @ setImmediate.js:113 
error_handler.js:55 ORIGINAL STACKTRACE: 
ErrorHandler.handleError @ error_handler.js:55 
next @ application_ref.js:346 
schedulerFn @ async.js:91 
SafeSubscriber.__tryOrUnsub @ Subscriber.js:223 
SafeSubscriber.next @ Subscriber.js:172 
Subscriber._next @ Subscriber.js:125 
Subscriber.next @ Subscriber.js:89 
Subject.next @ Subject.js:55 
EventEmitter.emit @ async.js:77 
NgZone.triggerError @ ng_zone.js:329 
onHandleError @ ng_zone.js:290 
ZoneDelegate.handleError @ zone.js:246 
Zone.runTask @ zone.js:154 
ZoneTask.invoke @ zone.js:345 
data.args.(anonymous function) @ zone.js:1224 
(anonymous) @ setImmediate.js:48 
runIfPresent @ setImmediate.js:67 
onGlobalMessage @ setImmediate.js:113 
error_handler.js:56 TypeError: this._content._show is not a function 
at HTMLElement._show (eval at module.exports (http://localhost:4200/scripts.bundle.js:14:8), :23221:21) 
at eval (eval at module.exports (http://localhost:4200/scripts.bundle.js:14:8), ::27) 
at ZoneDelegate.invokeTask (http://localhost:4200/vendor.bundle.js:111568:35) 
at Object.onInvokeTask (http://localhost:4200/vendor.bundle.js:32533:37) 
at ZoneDelegate.invokeTask (http://localhost:4200/vendor.bundle.js:111567:40) 
at Zone.runTask (http://localhost:4200/vendor.bundle.js:111444:47) 
at ZoneTask.invoke (http://localhost:4200/vendor.bundle.js:111638:33) 
at data.args.(anonymous function) (http://localhost:4200/vendor.bundle.js:112517:25) 
at eval (eval at module.exports (http://localhost:4200/scripts.bundle.js:14:8), :3341:25) 
at runIfPresent (eval at module.exports (http://localhost:4200/scripts.bundle.js:14:8), :3360:21) 
at onGlobalMessage (eval at module.exports (http://localhost:4200/scripts.bundle.js:14:8), :3406:17) 
ErrorHandler.handleError @ error_handler.js:56 
next @ application_ref.js:346 
schedulerFn @ async.js:91 
SafeSubscriber.__tryOrUnsub @ Subscriber.js:223 
SafeSubscriber.next @ Subscriber.js:172 
Subscriber._next @ Subscriber.js:125 
Subscriber.next @ Subscriber.js:89 
Subject.next @ Subject.js:55 
EventEmitter.emit @ async.js:77 
NgZone.triggerError @ ng_zone.js:329 
onHandleError @ ng_zone.js:290 
ZoneDelegate.handleError @ zone.js:246 
Zone.runTask @ zone.js:154 
ZoneTask.invoke @ zone.js:345 
data.args.(anonymous function) @ zone.js:1224 
(anonymous) @ setImmediate.js:48 
runIfPresent @ setImmediate.js:67 
onGlobalMessage @ setImmediate.js:113 
Subscriber.js:227 Uncaught TypeError: this._content._show is not a function 
at HTMLElement._show (eval at module.exports (http://localhost:4200/scripts.bundle.js:14:8), :23221:21) 
at eval (eval at module.exports (http://localhost:4200/scripts.bundle.js:14:8), ::27) 
at ZoneDelegate.invokeTask (http://localhost:4200/vendor.bundle.js:111568:35) 
at Object.onInvokeTask (http://localhost:4200/vendor.bundle.js:32533:37) 
at ZoneDelegate.invokeTask (http://localhost:4200/vendor.bundle.js:111567:40) 
at Zone.runTask (http://localhost:4200/vendor.bundle.js:111444:47) 
at ZoneTask.invoke (http://localhost:4200/vendor.bundle.js:111638:33) 
at data.args.(anonymous function) (http://localhost:4200/vendor.bundle.js:112517:25) 
at eval (eval at module.exports (http://localhost:4200/scripts.bundle.js:14:8), :3341:25) 
at runIfPresent (eval at module.exports (http://localhost:4200/scripts.bundle.js:14:8), :3360:21) 
at onGlobalMessage (eval at module.exports (http://localhost:4200/scripts.bundle.js:14:8), :3406:17) 
_show @ ons-splitter-content.js:190 
(anonymous) @ ons-splitter-content.js:181 
ZoneDelegate.invokeTask @ zone.js:275 
onInvokeTask @ ng_zone.js:260 
ZoneDelegate.invokeTask @ zone.js:274 
Zone.runTask @ zone.js:151 
ZoneTask.invoke @ zone.js:345 
data.args.(anonymous function) @ zone.js:1224 
(anonymous) @ setImmediate.js:48 
runIfPresent @ setImmediate.js:67 
onGlobalMessage @ setImmediate.js:113 

答えて

0

、sidePageComponentとcontentPageComponent両方のためのセレクタとしてアドオン・ページの使用は、上記のエラーが発生します。したがって、このチュートリアルは、ons-page [content]やons-page [side]のような異なるセレクタ名で変更する必要があります。