0

I am trying to code the below sample program in Angular js using Sublime Text. I have already included the angular package in Preferences. The code doesnn't work when I give the src for angular as src="angular.min.js", where as it works I give the src as src="https://code.angularjs.org/1.4.0/angular.js". How do I link the src correctly on my computer?

enter image description here

2 Answers 2

1

Just download the reference that you use and save it as angular.min.js on the same folder where your app is.

Also no need to have multiple ng-app mentioned in the div.

If you are having a separate controller defined, it is necessary to define the ng-app with the module name and mention the controller in the view.

Sign up to request clarification or add additional context in comments.

6 Comments

I gave the source as src="C:\Desktop\angular.min.js" and it worked. So does this mean that, if I have to use angular-animate.min.js, then should I give another source link to animate in this format - src="C:\Desktop\angular-animate.min.js"
You dont have to use animate at all. just angular.min will work. I dont recommend to give desktop path. just put inside the folder
I tried to put it in the same folder, where the sublime text is, and it didnt work. Also put it in the packages folder of sublime text, still didnt work.I have already placed, Angular JS folder in the browse packages folder.
yes, it shows this error Failed to load resource: net::ERR_FILE_NOT_FOUND
Thanks a lot Sajeetharan,it worked. I had been trying to put it in the Sublime text folder and not in folder where the source .html file is. By app I had understood it as the text editor. Now it works once I put the angular.min.js in the folder where the source code is.
|
0

Try running Sublime Text as Administrator.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.