Posts

Interview Redux

 What is Redux?     -    Redux is a library used for managing the state of application.  (or) Manage the application state in a predictable way. What are benefits?     - Predictable application state     - Decoupled architecture     - Testability     - Great Tooling      - Undo/redo     When to use Redux?  - Independent copies of the same data in multiple places  - Multiple Views need to work with the same data and be in sync.  - Data can be updated by multiple users  - Data can be update by multiple actors What are building block of Redux?          - Store          - Actions           - Reducers What is the Store?  - A Single JS object that contains the state of  the application. (Only one copy of the data is available for entire application. It can be used by different components) What is the Actions?     - Actions are Plan JS object that represents something that has happened. (Actions are know Events. For example: postingMessage is an command and MassagePostedEvent is know as Even

Generate the Angular Module using CLI

  Generating the module & routing with in the folder ng g m dashboard/dashboard --routing Generate the module and routing with out the folder. ng g m dashboard/dashboard --routing --flat

There is no directive with "exportAs" set to "ngForm" in Angular 2.0 or 4.0

Error got is : There is no directive with "exportAs" set to "ngForm"  for below html. <div class="container">     <form #ProdForm="ngForm" (ngSubmit)="onSubmit($event)" autocomplete="off">         <div class="form-horizontal">             <h3> Product Form</h3>             <div class="form-group">                 <label for="inputText" class="control-label col-xs-2">Number</label>                 <div class="col-xs-10">                     <input type="number" class="form-control" id="txtCustomerName" placeholder="Product Number" required [(ngModel)]="editProduct.id">                 </div>             </div>             <div class="form-group">                 <label for="inputText" class="control-label col-xs

Angular 2.0/4.0 Configuration in Visual Studio

Image
Angular 2.0/4.0 Setup in Visual Studio Step 1:   Install node.js & TypeScript                 For checking node.js is installed in command prompt use “node -v” or “node --version”(space before -)                 For checking TypeScript is installed in command prompt use “tsc  -v” Step 2: Open latest version of Visual Studio                 Select File->project Step 3: Under Templates select web option as seen below image. Change project name as you required & press OK button Step 4: Select MVC project& select OK Step 5:  Download Sample From angular.io Ref https://angular.io/docs/ts/latest/guide/setup.html#!#download 1. Open VS NewProject ->select MVC template. Now add below files to root  Systemjs.config.js  Tsconfig.json  Packages.json Step 6 : Project -> Rt click -> new folder {app} In app folder add  Main.ts  App.module.ts  App.component.ts Step 7: Now in index.html page copy the scrip