1. Question:How AngularJS handle the security? 

    Answer
    AngularJS provide following built-in protection from basic security holes:
    1. Prevent HTML injection attacks.
    2. Prevent Cross-Site-Scripting (CSS) attacks.
    3. Prevent XSRF protection for server side communication.
    
    Also, AngularJS is designed to be compatible with other security measures like Content Security Policy (CSP), HTTPS (SSL/TLS) and server-side authentication and authorization that greatly reduce the possible attacks.






    1. Report
  2. Question:What are Modules in AngularJS? 

    Answer
    AngularJS modules are containers just like namespace in C#. They divide an angular app into small, reusable and functional components which can be integrated with other angular app. Each module is identified by a unique name and can be dependent on other modules. In AngularJS, every web page (view) can have a single module assigned to it via ng-app directive.
    
    Creating an AngularJS module 
    <script type="text/javascript">
    //defining module 
    angular.module('myApp', []); 
    //OR defining module which has dependency on other modules 
    angular.module('myApp', ['dependentModule1', 'dependentModule2']); 
    </script>
    Using an AngularJS module into your app You can bootstrap your app by using your AngularJS module as given below:
    <html ng-app="myApp"> 
    <head> ... </head>
    <body> ... </body>
    </html>






    1. Report
  3. Question:What components can be defined within AngularJS modules? 

    Answer
    You can define following components with in your angular module:
    1. Directive
    2. Filter
    3. Controller
    4. Factory
    5. Service
    6. Provider
    7. Value
    8. Config settings and Routes






    1. Report
  4. Question:What is core module in AngularJS? 

    Answer
    ng is the core module in angular. This module is loaded by default when an angular app is started. This module provides the essential components for your angular app like directives, services/factories, filters, global APIs and testing components.






    1. Report
  5. Question:How angular modules load the dependencies? 

    Answer
    An angular module use configuration and run blocks to inject dependencies (like providers, services and constants) which get applied to the angular app during the bootstrap process.






    1. Report
Copyright © 2025. Powered by Intellect Software Ltd