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?
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"
You script tags are wrapped in a conditional IE tag.
<!--[if lt IE 9]>
Place your angular script tag outside of that and you'll be fine.
If you've downloaded the angular.js file from Google, you need to make sure that everyone has Read access to it, or it will not be loaded by your HTML file. By default, it seems to download with No access permissions.