How/where to import Angular and Bootstrap .js files in my index.html?

<p>I'm new to web front-end programming and am teaching myself AngularJS.</p><p>I have created a very simple webapp that just lets users login and logout. I am running it locally on my Mac OSX.</p><p>Below is my <code>index.html</code> file. Although it works, I'm not sure if I'm doing it right. I need to know how and where to import the angular.js files and the bootstrap.js files.</p><p>My questions are as follows. I haven't been able to figure this stuff out by googling. I need someone to explain this stuff to me please.</p><ol><li>I'm currently importing the <code>angular.js</code> file from <code>http://ift.tt/Q55qZD</code>. Is that correct? Or should I download it and store that file in the same directory as <code>index.html</code>? Why? When should I use the non-minified file? What is the benefit of using non-minified?</li><li>I'm currently not importing any bootstrap file(s). Which file(s) should I import? Should I import it/them as a URL or as a file from the same directory as <code>index.html</code></li><li>For both Bootstrap and AngularJS, please tell me which line numbers I should put the <code>script src</code> lines in my HTML.</li><li>Should I check the Angular and Bootstrap files into my Github repository?</li></ol><p>index.html:</p><pre><br /><code> 1 <html ng-app="app"><br /> 2 <head><br /> 3 </head><br /> 4 <body ng-controller="Main as main"><br /> 5 <input type="text" ng-model="main.username" placeholder="username"><br><br /> 6 <input type="password" ng-model="main.password" placeholder="password"><br><br /> 7 <br><br /> 8 <button ng-click="main.login()" ng-hide="main.isAuthed()">Login</button><br /> 9 <button ng-click="main.logout()" ng-show="main.isAuthed()">Logout</button><br />10 <br/><br />11 {{main.message}}<br />12 <script src="http://ift.tt/1VpgoFJ"></script><br />13 <script src="app.js"></script><br />14 </body><br />15 </html><br /></code><br /></pre><br /><h2>Click here view more answers <a href="%20http://stackoverflow.com/questions/34525650/how-where-to-import-angular-and-bootstrap-js-files-in-my-index-html">http://ift.tt/1NQ8lyK</a></h2>

Nhận xét

Bài đăng phổ biến từ blog này

Align div to bottom of the page in bootstrap

Align elements inside an tag vertically

Javascript is unable to stop page loading