Onsen用户界面&x2B;Angular 2给出了这个。内容。显示不是一个函数错误

Onsen用户界面&x2B;Angular 2给出了这个。内容。显示不是一个函数错误,angular,onsen-ui,Angular,Onsen Ui,OS? Linux Mint 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-dy

OS?

Linux Mint 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
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), :23210: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), :23210: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
复制步骤。

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
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), :23210: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), :23210: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
这是一个不是使用CLI创建的应用程序吗?您对代码做了什么更改?等 我想在我自己的angular应用程序中实现onsen ui ons拆分器标记。我将两个组件导入到单个文件中,并将单个文件作为NgModule导入。因此,在运行angular应用程序时,控制台首先给了我一个与此问题对应的错误#3975。因此,为了解决这个问题,我发布了命令npm install--save zone。js@0.7.4在我的角度项目文件夹内。 在声明中包括contentComponent和sidePageComponet以及entryComponent字段后,我得到了一个新的错误,我找不到任何解决方案

故障给出的日志。

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
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), :23210: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), :23210: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

在本教程splitter教程中,将ons页面用作sidePageComponent和contentPageComponent的选择器会引发上述错误。因此,本教程应使用不同的选择器名称进行更改,如ons页面[content]和ons页面[side]