如何获得更多的帮助,也许是......? [英] How to get a bit more help perhaps...?

查看:203
本文介绍了如何获得更多的帮助,也许是......?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点不好意思承认,我刚刚花了更多的时间固定的恐惧问题:

I am a little embarrassed to admit I have just spent more time fixing the dread issue:

**Syntax Error: Unexpected token <**

我的错误是,我已经忘了以下添加到我的index.html:

My mistake was that I had forgotten to add the following to my index.html:

<script src="node_modules/angular2/bundles/router.dev.js"></script>

不过我包括:

<script src="node_modules/angular2/bundles/angular2.dev.js"></script>

有没有配置angular2开发版本放出更多的有用信息的一种方式这将意味着我会得到关于开发类似这样的问题,更有帮助的信息?

Is there a way of configuring the angular2 dev version to emit more helpful info which would mean that I would get more helpful info regarding issues like this in dev?

推荐答案

**语法错误:意外的令牌LT; ** 来自 SystemJS 试图导入 ROUTER_PROVIDERS 或任何相关的路由器。因为你没有添加 router.dev.js 将无法导入,以及Web服务器请求将返回一个 404 。您将可以看到这个错误在你的网络控制台。该意外标记&LT; 实际上是开始标记&LT;!DOCTYPE HTML&GT; 404

The **Syntax Error: Unexpected token <** comes from SystemJS trying to import the ROUTER_PROVIDERS or anything router related. Because you did not add the router.dev.js it won't be able to import it, and the webserver request will return a 404. You will be able to see this error in your network console. The unexpected token < is actually the start tag of <!DOCTYPE html> from your 404 page

这篇关于如何获得更多的帮助,也许是......?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆