问题描述
router.js代码在此处
0% compiling
Compiling angular-font-awesome : es2015 as esm2015
chunk {main} main.js,main.js.map (main) 2.07 kB [initial] [rendered]
chunk {polyfills} polyfills.js,polyfills.js.map (polyfills) 677 bytes [initial] [rendered]
chunk {runtime} runtime.js,runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {scripts} scripts.js,scripts.js.map (scripts) 168 kB [entry] [rendered]
chunk {styles} styles.js,styles.js.map (styles) 2.25 MB [initial] [rendered]
chunk {vendor} vendor.js,vendor.js.map (vendor) 342 kB [initial] [rendered]
Date: 2020-08-20T18:45:45.144Z - Hash: accfc9d111ebf6532cd5 - Time: 4333ms
ERROR in Failed to compile entry-point angular-font-awesome (es2015 as esm2015) due to compilation errors:
node_modules/angular-font-awesome/dist/angular-font-awesome.js:3968:26 - error NG1010: Value at position 0 in the NgModule.imports of AngularFontAwesomeModule is not a reference: [object Object]
3968 imports: [CommonModule],** Angular Live Development Server is listening on localhost:4200,open your browser on http://localhost:4200/ **
login.js,其中的演示是代码
import React from 'react';
import { Route } from 'react-router-dom';
import CommentList from './containers/commentview';
import CommentDetalList from './containers/commentdetailview';
import Demo from './containers/Login'
const BaseRouter = () =>(
<div>
<Route exact path='/' component={CommentList}/>
<Route exact path='/:commentid' component={CommentDetalList}/>
<Route exact path='/login' component={Demo}/>
</div>
)
export default BaseRouter;
所以问题是当我去http:// localhost:3000/1时,我从id 1 id获得视图,但是当我去http:// localhost:3000 / login时,我从id1获取视图。还有登录页面,但是正如您所看到的democode或login.js代码,我只返回登录页面,我想在进入http:// localhost:3000 / login
时获得唯一的登录页面。 >解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)