Skip to content

Angular

Kota edited this page Oct 23, 2018 · 28 revisions
  • https://angular.io

  • Application = Components + Services | Components = View + Class + MetaData

  • Modules => Root Angular Module (components) + Feature Angular Modules (components)

  • Supports ES 5. Scripts written in ES 2015 (ES 6) or Typescript should be transpiled. ES = ECMA Script (European Computer Manufacturer's Association)

  • Why not Javascript

    • Doesn't provide namespace and all methods/function will be under global namespace
    • No Code Organization
    • AngularJS Modules helps in addressing it (In ES 2015, a file is a module).
      • ES 2015 module
      // exporting module 
      export class Product { }     -> transpiles to ->   function Product() { }
      
      // importing it for use
      import { Product } from './product'
      
      • Angular Module: can communicate to other modules and a module can have many components

Clone this wiki locally