rahul
rahul

Reputation: 393

Add angular.js in HTML file

I am new at web development and working on one project where i have to use bower tool for front end development.I have created a project in intellij and installed bower and grunt on local project with angular js and jquery.i have created a file called index.html and its working fine when i write HTML but now i want to code in angular js. So i have added the script tag which is shown below in html file but it doesnt work. I know its a basic thing but i am not able to get it. I tried many things. Thank you in advance.

Upvotes: 0

Views: 2489

Answers (2)

Ethaan
Ethaan

Reputation: 11376

Ok just to make sure.

first

Check into the bower_components directory if the Angular folder is there.

If angular folder is there, like on the image. enter image description here

if the file its not there run bower install angular or sudo bower install angular

second

You could manually add the Angular Sortable script files yourself but Yeoman will automate this for you!

now run grunt serve just to check if angular script tag is there.

you should get this on console.

<script src="bower_components/angular/angular.js"></script>

Third

If this is ok, you could start getting into this tutorials to start using Angular.

W3 School Angular tutorial

thinkster.io Tutorial

From angular docs

Upvotes: 1

Muhammad kashif Hanif
Muhammad kashif Hanif

Reputation: 75

include the Angular Javascript file via script tag. http://fdietz.github.io/recipes-with-angular-js/introduction/including-the-angular-library-code-in-an-html-page.html check this link for detail

Upvotes: 0

Related Questions