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"

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程