AngularJS-CLI-Introduction

WHAT IS ANGULAR

  • AngularJS is a JavaScript-based open-source front-end web application framework mainly maintained by Google and by a community of individuals and corporations to address many of the challenges encountered in developing single-page applications.
  • Initial release: October 20, 2010; 8 years ago
  • Stable release: 1.7.5 / October 4, 2018; 2 months ago
  • Preview release: 1.7 rc0 / April 19, 2018; 7 months ago
  • Developed by: Google
  • License: MIT License
  • Platform: Cross-platform, see Legacy browser support

PRE REQUISITES

  • Node.js® and npm
  • Verify that you are running at least Node.js version 8.x or greater and npm version 5.x or greater
  • Run node -v and npm -v in a terminal/console window. Older versions produce errors, but newer versions are fine.

PROS and CONS

 

ANGULAR2 PROJECT

PROJECT FOLDER STRUCTURE

  • Your app lives in the src folder. All Angular components, templates, styles, images, and anything else your app needs go here. Any files outside of this folder are meant to support building your app.

FUNDAMENTALS

  • Angular Modules
  • Angular Components
  • Angular Directives
  • Angular Models
  • Angular Controllers
  • Angular Data Binding

MODULES

  • Angular apps are modular and Angular has its own modularity system called NgModules. An NgModule is a container for a cohesive block of code dedicated to an application domain, a workflow, or a closely related set of capabilities.
  • It can contain components, service providers, and other code files whose scope is defined by the containing NgModule.
  • One module can Import functionality that is exported from other NgModules, and Export selected functionality for use by other NgModules

Generate new module using cli

For example login module:

ng generate c login

COMPONENTS

  • Every Angular application has at least one component, the root component that connects a component hierarchy with the page DOM.
  • Each component defines a class that contains application data and logic, and is associated with an HTML template that defines a view to be displayed in a target environment.

Specialties of Angular

2 Comments

2 Trackbacks / Pingbacks

  1. Google
  2. Google

Leave a Reply

Your email address will not be published.


*