What is Angular

What is Angular

Angular is an open-source JavaScript MVC framework for the web applications.

Google maintains it, It extends the HTML and makes it dynamic. Angular is used to create Single Page Applications. Angular has clear advantages while also providing a standard structure for developers to work with. official site.

  • A component-based framework for building scalable web applications
  • A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more
  • A suite of developer tools to help you develop, build, test, and update your code
What is Angular

Angular Architecture

  1. Modules

    An Angular app has a root module, named AppModule, which provides the bootstrap mechanism to launch the application. Every Angular application has at least one NgModule class, root module , which is conventionally named AppModule and resides in a file named app.module.ts. You launch your application by bootstrapping the root NgModule.
    An NgModule is defined by a class decorated with @NgModule().

    declarations: The components, directives, and pipes that belong to this NgModule.

    exports: The subset of declarations that should be visible and usable in the component templates of other NgModules.

    imports: Other modules whose exported classes are needed by component templates declared in this NgModule.

    providers: Creators of services that this NgModule contributes to the global collection of services; they become accessible in all parts of the application. (You can also specify providers at the component level.)

    bootstrap: The main application view, called the root component, which hosts all other application views. Only the root NgModule should set the bootstrap property.

  2. Components

    Each component in the application defines a class that holds the application logic and data. A component generally defines a part of the user interface (UI).

  3. Templates

    The Angular template combines the Angular markup with HTML to modify HTML elements before they are displayed

  4. Metadata

    Metadata tells Angular how to process a class. It is used to decorate the class so that it can configure the expected behavior of a class.

  5. Services

    When you have data or logic that isn’t associated with the view but has to be shared across components, a service class is created. The class is always associated with the @Injectible decorator.

  6. Dependency Injection

    This feature lets you keep your component classes crisp and efficient. It does not fetch data from a server, validate the user input, or log directly to the console. Instead, it delegates such tasks to the services.

How to Install Angular

Angular Directives