Angular Js interview question



Angular Js 


Interview Questions 


1.   What is Angular Framework?

    Angular is a **TypeScript-based open-source** front-end platform that makes it easy to build applications with in web/mobile/desktop.
 The major features of this framework such as declarative templates, dependency 
injection, end to end tooling, and many more other features are used to ease the
 development.

   

2.   What is the difference between AngularJS and Angular?
    Angular is a completely revived component-based framework in which an application is a tree of individual components.

    Some of the major difference in tabular form

    | AngularJS | Angular |
    |---- | ---------
    | It is based on MVC architecture  | This is based on Service/Controller |
    | This uses use JavaScript to build the application| Introduced the typescript to write the application |
    | Based on controllers concept| This is a component based UI approach|
    | Not a mobile friendly framework| Developed considering mobile platform|
    | Difficulty in SEO friendly application development| Ease to create SEO friendly applications|

   


3.   What is TypeScript?
    TypeScript is a typed superset of JavaScript created by Microsoft that 
adds optional types, classes, async/await, and many other features, and compiles
 to plain JavaScript. Angular built entirely in TypeScript and used as a primary
 language.
    You can install it globally as
    ```
    npm install -g typescript
    ```
    Let's see a simple example of TypeScript usage,
    ```typescript
    function greeter(personstring) {
        return "Hello, " + person;
    }

    let user = "Sudheer";

    document.body.innerHTML = greeter(user);
    ```
    The greeter method allows only string type as argument.

   

4.   Write a pictorial diagram of Angular architecture?
    The main building blocks of an Angular application is shown in the below 
diagram
    ![ScreenShot](images/architecture.png)

   

5.   What are the key components of Angular?
    Angular has the below key components,
    1. **Component:** These are the basic building blocks of angular application
 to control HTML views.
    2. **Modules:** An angular module is set of angular basic building blocks 
like component, directives, services etc. An application is divided into logical
 pieces and each piece of code is called as "module" which perform a single task.
    3. **Templates:** This represent the views of an Angular application.
    4. **Services:** It is used to create components which can be shared across
 the entire application.
    5. **Metadata:** This can be used to add more data to an Angular class.






Comments

Post a Comment

please do not enter any spam link in the comment box