druzuz321103 2015-06-20 00:15 采纳率: 100%
浏览 136

Angular - Uncaught ReferenceError:未定义angular

I'm trying to use a simple Angular function in my Laravel 5 project and I keep getting this error:

angular is not defined

I have tried to move angular.min.js to the top making it the first JS script on my index page but it still doesn't work.

This is my code: pastebin code

It only outputs {{name}} and not the actual string from the controller!

What am I doing wrong?

  • 写回答

3条回答 默认 最新

  • douchunji1885 2015-06-20 00:31

    I have seen this issue before. In my case it was due to the incorrect relative reference i was using. I am not an expert in this matter but i would recommend you to try with different combinations and see if it helps. Also see where the js folder is placed in your website hierarchy

    Ex. src="js/angular.min.js" or src="../js/angular.min.js"

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 请问如何查看手机root记录?
  • ¥15 商城小程序订单号重复
  • ¥15 学校优化算法sbo和蚁群算法怎么结合
  • ¥21 matlab怎么求时域信号的二阶导数
  • ¥15 判断两个表是否完全相同
  • ¥15 java map类型数据格式,如何快速通过前缀匹配元素
  • ¥15 stc12c5a60s2、QMC5883L、LCD1602组合测量磁场所需程序
  • ¥20 Win11测试yolov4,“找不到nvcuda.dll”怎么办?
  • ¥15 simulink绘制bode图
  • ¥15 php_network_getaddresses: getaddrinfo failed: Name or service not known