控制台输出:

1.谷歌:Uncaught SyntaxError: Unexpected identifier

2.火狐:SyntaxError: missing ] after element list

3.IE  and Edge:SCRIPT1007: 缺少 ']'

错误代码:

  1. setTimeout($rootScope.$broadcast(XXXXX,'xxxxx'), 1000);

错误原因:

setTimeout的参数,不支持AngularJS的$rootScope.$broadcast.

解决办法:

  1. setTimeout(broadCast(xxxxx), 1000);
  2.  
  3. var broadCast = function (xxxxx) {
  4. $rootScope.$broadcast(XXXXX, 'xxxxx');
  5. }

用方法包装一下就好了。

错误名称:Uncaught SyntaxError: Unexpected identifier的更多相关文章

  1. JavaScript onclick传递对象参数(easyui传递一行数据时)错误:uncaught SyntaxError: Unexpected identifier

    JavaScript onclick传递对象参数(easyui传递一行数据时)错误:uncaught SyntaxError: Unexpected identifier 博主遇到的是用onclick ...

  2. easyui 传递参数报错(错误:uncaught SyntaxError: Unexpected identifier)

    转自:https://www.cnblogs.com/javaboy2018/p/8733585.html 代码: 按钮事件: function formatOper(val, row, index) ...

  3. Chrome_调试js出现Uncaught SyntaxError: Unexpected identifier

    转载自:http://blog.csdn.net/yiluoak_47/article/details/7663952 chrome下运行编写的JavaScript代码时,在工具javascript控 ...

  4. [JS]常见JS错误之一:Uncaught SyntaxError: Unexpected identifier

    在编写JS时如果创建变量没有用var而是使用了变量的类型,如: MyClass c=new MyClass(); 这样的错误Java程序员容易犯,也许不经意就写出来了,然后chrome的开发者工具里会 ...

  5. 后台返回json字符串 页面js报错 Uncaught SyntaxError: Unexpected identifier

    后台json字符串是 [{"name": "报销申请", "id": "start"}, {"name&quo ...

  6. JSP获取json格式的数据报错 Uncaught SyntaxError: Unexpected identifier

    后台json字符串是 {"id":"cmdb_ci.`fully_qualified_domain_name`","field":" ...

  7. Apicloud_(问题)P54提示错误:Uncaught SyntaxError: Unexpected token ) at main.html : 117

    <30天App开发从0到1:APICloud移动开发实战>第54页 打开main.html,在apiready中添加一段代码 api.addEventListener({ name: 'c ...

  8. HTML5 plus 报错 Uncaught SyntaxError: Unexpected identifier at XXXX.html:1

    最近使用 VUE2.X + muse-ui  + HTML5 plus 开发webApp 调用HTML5 plus报错,错误提示如下 Uncaught SyntaxError: Unexpected ...

  9. JS错误:Uncaught SyntaxError: Unexpected token ILLEGAL

    $('tbody', '#' + tableId).append('<tr onmouseover="this.style.backgroundColor=\'#eeeeee\'&qu ...

随机推荐

  1. J - 组合

    J - 组合 Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%lld & %llu Description 有两 ...

  2. Future Promise 模式(netty源码9)

    netty源码死磕9  Future Promise 模式详解 1. Future/Promise 模式 1.1. ChannelFuture的由来 由于Netty中的Handler 处理都是异步IO ...

  3. php解析xml文件为数组

    $xml = simplexml_load_file($fullfilename); $arr = json_decode(json_encode($xml),true); echo "&l ...

  4. centos 下安装pdo_pgsql 只需一个命令_______yum install php56w-pgsql

    [root@localhost ~]# yum install php56w-pgsql Loaded plugins: fastestmirror, langpacks Repository pgd ...

  5. Oracle数据库获取uuid函数

    Oracle新建系统表时,要求主键为32位uuid,推測Oracle肯定会提供相关的函数. 翻阅相关文档,果然发现Oracle提供的函数 sys_guid() 用于获取32位uuid,简单使用为 se ...

  6. Tensorflow 初级教程(一)

    初步介绍 Google 于2011年推出人工深度学习系统——DistBelief.通过DistBelief,Google能够扫描数据中心数以千计的核心,并建立更大的神经网络.Google 的这个系统将 ...

  7. Bootstrap学习2--组件-列表组

    备注:最新Bootstrap手册:http://www.jqhtml.com/bootstraps-syntaxhigh/index.html 1.列表组 列表组是Bootstrap框架新增的一个组件 ...

  8. 股票技术指标中的VOL,KDJ,MACD,OBV,VR,DMA分别代表什么意思?很关键,谢谢

    http://zhidao.baidu.com/link?url=glKK7n0JUgqgrvfx2Gzd937-5zZg1bC615MwAp0P_mrYDytnMUpjoOQgYU871ny8St1 ...

  9. Nginx启动与停止

    参考:https://www.phusionpassenger.com/library/install/nginx/install/oss/rubygems_rvm/ Starting Nginx Y ...

  10. Android系统Recovery工作原理之使用update.zip升级过程分析(三)【转】

    本文转载自:http://blog.csdn.net/mu0206mu/article/details/7464699 以下的篇幅开始分析我们在上两个篇幅中生成的update.zip包在具体更新中所经 ...