错误:
BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy-loaded module, import `CommonModule` instead.
从Angular
5升级到7后,出现此错误。请帮我解决这个问题
答案 0 :(得分:1)
在
<form class='io'> <table> <thead> <tr> <th>Type</th> <th>Desciption</th> <th>Image/URL</th> <th><button>➕</button></th> </tr> </thead> <tbody class='grid'> <tr> <td> <select class='type'> <option value="X" default></option> <option value="GDS">Guides</option> <option value="PRO">Promos</option> <option value="TEM">Templates</option> <option value="VID">Videos</option> </select> </td> <td><textarea class='desc data' rows='1' cols='20' disabled></textarea></td> <td><textarea class='urls data' rows='1' cols='20' disabled></textarea></td> <td><button class='del' type='button'>❌</button></td> </tr> </tbody> </table> </form> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
中仅在modules
下方导入:
root module (app.module.ts)
答案 1 :(得分:0)
自己修复
全局和本地项目的ng版本完全不同。卸载全局ng版本后,此问题得以解决。在冲突期间,我有多个webpack列表。删除该webpack后,效果很好