Populate lib folder of an Angular project

Viewed 523

I am unexperienced with front-end technologies and I've started to learn AngularJS today. I have the following project structure:

|-webapp
     |
     |-css
     |-lib
     |-scripts
     |-index.html

I analysed some example projects and I noticed that the code within scripts folder often refers to routines that exist in the lib folder. What I want to know is how the lib folder is supposed to be populated in the first place? Is there a common procedure to do this, e.g. an auto-import operation that analises my code and automatically places the corresponding dependencies in lib? In line with the latter, does an IDE such as IntelliJ provide any feature to accomplish this?

Thank you for your help.

1 Answers

In angularJS you have to manually import the required dependencies, because you have to registered that into the main module which is called as app.module. AngularJs follows the MVC structure so you need to make new folders for all AngularJs controllers as well .I will suggest you first understand the basic workflow of angularJs. How its application bootstrapped.

webapp -
   |scripts -  bootstrap.min.js/bootstrap.js
            -   angular.js 
            -   
   |controllers- login.js
                -logout.js 

   | html- index.html,
          -login.html

for basic idea : you can refer this also

<html>
<head>

    <title>Assignment !!</title>
    <!-- BOOTSTRAP STYLES-->
    <link href="..//css/bootstrap.css" rel="stylesheet" />

    <!--  SCRIPTS or Library from other sources -->
    <script src="../Scripts/bootstrap.min.js"></script>
    <!-- Customized SCRIPTS -->

    <script src="../Custom/Controllers/Login.js"></script>
    <script src="../Custom/Controllers/Logout.js"></script>
</head>
<body class="homepage" ng-app="AngularApp">
    <div ng-controller="InwardbillCtrl" >
 </body>   
             <---Put your content here -->
</body>
</html>
Related