Skip to main content

Posts

Showing posts with the label TypeScript Modules

What Is Feature Modules? What Are the Types of Feature Modules?

What Is Feature Modules? What Are the Types of Feature Modules? The feature modules are modules that goal of organizing an application code.  It also helps you partition the app into focused areas when you can do everything within the root module. There are five types of feature modules which are the following- 1.            Domain Feature Modules 2.            Routed Feature Modules 3.            Routing Modules 4.            Service Feature Modules 5.            Widget Feature Modules Routed Feature Module  - Routed feature modules are domain feature modules that components targets of router navigation routes. A lazy-loaded routed feature module should not be imported by any module. Routed feature ...

TypeScript Modules - Internal Modules, External Modules and Exports

What's a Module?   The module system is an interesting feature of TypeScript, the statically typed superset of JavaScript. Modules provide the possibility to group related logic, encapsulate it, structure your code and prevent pollution of the global namespace. What’s an Internal Module?   You can define modules within your typescript files and all variables defined within the module are scoped to the module and removed from the global scope. You can access the variable outside the module using the export keyword and also you can extend internal modules, share them across files, and reference them using the triple slash.  Syntax - ( /// )  Stayed Informed – Learn Angular 2 with TypeScript Table of Contents - TypeScript Modules 1.      Internal Modules a.       Implicit Internal Modules b.      Named Internal Modules 2.      External Modules 3. ...