我有一个全新的Angular 4 CLI应用程序.运行之后:
npm install bootstrap@4.0.0-beta jquery popper.js --save
Run Code Online (Sandbox Code Playgroud)
和编辑.angular-cli.json像这样:
"styles": [
"styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.slim.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js",
"../node_modules/popper.js/dist/umd/popper.min.js"
],
Run Code Online (Sandbox Code Playgroud)
我在Chrome控制台中仍有问题:
Uncaught Error: Bootstrap dropdown require Popper.js (https://popper.js.org)
at eval (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:6:17548)
at eval (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:6:23163)
at eval (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:6:50902)
at eval (<anonymous>)
at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9)
at Object.../../../../script-loader/index.js!../../../../bootstrap/dist/js/bootstrap.min.js (bootstrap.min.js?f885:1)
at __webpack_require__ (bootstrap a2f1d85ef068872b0530:54)
at Object.2 (scripts.bundle.js:66)
at __webpack_require__ (bootstrap a2f1d85ef068872b0530:54)
at webpackJsonpCallback (bootstrap a2f1d85ef068872b0530:25)
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
event.target返回执行操作的DOM元素.如何从输出中获取特定的子元素?
这是我的表单(使用Angular标记):
<form (ngSubmit)="onSubmit($event)" id="kekpek">
<div class="form-group">
<label>Example file input</label>
<input type="file" class="form-control-file" #fileupload [(ngModel)]="myFile" name="myFile" (change)="fileChange($event)"/>
</div>
<button type="submit" class="btn btn-success">Submit</button>
</form>
Run Code Online (Sandbox Code Playgroud)
它激发了这个功能:
onSubmit(event) {
console.log(event.target);
}
Run Code Online (Sandbox Code Playgroud)
哪个输出整个表格.我需要访问函数中的input元素onSubmit().
似乎这不是一个罕见的问题,但我找不到合适的解决方案。
我的假设是,因为有了SEO URLs核心模块,所以它应该在没有任何其他模块或.htaccess编辑的情况下进行工作。但是在系统/设置/服务器中启用SEO URL后,并非我的所有URL都是SEO。他们中的一些改变,以搜索引擎优化,但其他的还是样子index.php?route=account/register,index.php?route=information/contact,index.php?route=product/product&path=57&product_id=49等。
我应该怎么做才能解决这个问题?