Creating a reducer example: let’s say we have a file- account.reducer.ts export function reducer(state, action) { switch (action.type) { case ‘UPDATE_ACCOUNT_STATUS’: return { …state, accountStatus: action.payload }; default: return state; } } Then in another file let’s say app.module.ts we import the reducer for root import { StoreModule } fromContinue Reading

State data can be view data, user information, entity data, user selection or input and any other data that the application tracks .. what to do with so much data??? how to upkeep it ? how to notify it globally? Here comes, NgRx which is a reactive library for angularContinue Reading

Object Model Api: The model creates an object in memory thus enabling easy navigation and creation: Example of easy navigating: Java import javax.json.Json; import javax.json.JsonObject; Path file = Paths.get(“book.json”); InputStream stream = Files.newInputStream(file); try(JsonReader reader = Json.createReader(stream)){ JsonArray array= reader.readArray(); for(int i =0 ; i < array.size(); i++){ array.getJsonObject(i).getInt(“id”); }Continue Reading