添加aurelia-validation并获取BindingLanguage必须实现inspectTextContent()

时间:2016-12-11 15:15:01

标签: typescript aurelia aurelia-validation

我正在尝试向cli生成的TypeScript-Project添加验证,并在添加.plugin(“aurelia-validation”)后立即获取“BindingLanguage必须实现inspectTextContent()”。

在我的Win10机器上,它可以通过以下步骤重现:

  • au new test [Web,TypeScript,None(Style),Yes(test),VSCode]
  • npm install aurelia-validation --save
  • 在aurelia.json
  • 中添加依赖项
  • 然后在main.ts中添加aurelia.use.plugin(“aurelia-validation”)

Chrome控制台的完整错误: 未处理的拒绝错误:BindingLanguage必须实现inspectTextContent()。     在mi(http://localhost:9000/scripts/vendor-bundle.js:19678:11)     在BindingLanguage.inspectTextContent(http://localhost:9000/scripts/vendor-bundle.js:19695:7)     在ViewCompiler._compileNode(http://localhost:9000/scripts/vendor-bundle.js:21481:79)     在ViewCompiler._compileNode(http://localhost:9000/scripts/vendor-bundle.js:21501:33)     在ViewCompiler.compile(http://localhost:9000/scripts/vendor-bundle.js:21448:12)     在http://localhost:9000/scripts/vendor-bundle.js:22106:50 从以前的事件:     在http://localhost:9000/scripts/vendor-bundle.js:22099:119 从以前的事件:     在ViewEngine.loadViewFactory(http://localhost:9000/scripts/vendor-bundle.js:22083:67)     在ConventionalViewStrategy.loadViewFactory(http://localhost:9000/scripts/vendor-bundle.js:19503:25)     在HtmlBehaviorResource.load(http://localhost:9000/scripts/vendor-bundle.js:22841:29)     在http://localhost:9000/scripts/vendor-bundle.js:23374:18 从以前的事件:     在CompositionEngine.createController(http://localhost:9000/scripts/vendor-bundle.js:23362:71)     在CompositionEngine._createControllerAndSwap(http://localhost:9000/scripts/vendor-bundle.js:23341:19)     在CompositionEngine.compose(http://localhost:9000/scripts/vendor-bundle.js:23421:21)     在TemplatingEngine.compose(http://localhost:9000/scripts/vendor-bundle.js:23689:38)     在Aurelia.setRoot(http://localhost:9000/scripts/vendor-bundle.js:12528:21)     在http://localhost:9000/scripts/app-bundle.js:53:59 从以前的事件:     在Object.configure(http://localhost:9000/scripts/app-bundle.js:53:25)     在http://localhost:9000/scripts/vendor-bundle.js:11382:22 从以前的事件:     在配置(http://localhost:9000/scripts/vendor-bundle.js:11377:48)     在handleApp(http://localhost:9000/scripts/vendor-bundle.js:11368:12)     在http://localhost:9000/scripts/vendor-bundle.js:11401:13 从以前的事件:     在http://localhost:9000/scripts/vendor-bundle.js:11399:40 从以前的事件:     在http://localhost:9000/scripts/vendor-bundle.js:11398:29 从以前的事件:     在跑步(http://localhost:9000/scripts/vendor-bundle.js:11394:26)     在对象。 (http://localhost:9000/scripts/vendor-bundle.js:11421:3)     at Object.execCb(http://localhost:9000/scripts/vendor-bundle.js:5449:33)     在Module.check(http://localhost:9000/scripts/vendor-bundle.js:4637:51)     在Module.enable(http://localhost:9000/scripts/vendor-bundle.js:4929:22)     在Object.enable(http://localhost:9000/scripts/vendor-bundle.js:5310:39)     在模块。 (http://localhost:9000/scripts/vendor-bundle.js:4914:33)     在http://localhost:9000/scripts/vendor-bundle.js:3890:23     在每个(http://localhost:9000/scripts/vendor-bundle.js:3815:31)     在Module.enable(http://localhost:9000/scripts/vendor-bundle.js:4866:17)     在Module.init(http://localhost:9000/scripts/vendor-bundle.js:4542:26)     在http://localhost:9000/scripts/vendor-bundle.js:5213:36

0 个答案:

没有答案