Your Choice JavaScript News

Angular News Saturday, May 12 Dynamic forms, Google developer expert-led, Web worker & more…


What’s new?

  • When we build forms, we know theres a good chance that the data we want to collect may change.
  • Dynamic Forms in Angular give us the ability to define the underlying object model before binding the form to the template.
  • This lets our forms programmatically adjust to the underlying model so we dont have to update each form manually as our data will eventually change.
  • In this course Google Developer Expert-led we will use Angulars Reactive Forms and learn about the basics for dynamically rendering .
  • If youre coming from AngularJS (v1.x) you may also be familiar with dynamic forms in the context of , a library for automating dynamic forms.

Tags: dynamic forms, underlying object model, Google Developer Expert-led, advanced input controls, radio button lists


  • JavaScript programs in the main thread communicate with web workers using events.
  • Most importantly, web workers should be used in following cases – Data and web page cachingImage manipulation and encoding (base64 conversion)Canvas drawing and image filteringNetwork polling and web socketsBackground I/O operationsVideo/Audio buffering and analysisVirtual DOM diffingLocal database (indexedDB) operationsComputationally intensive data operationsLooks like there is a long list of things…
  • script – // inside – index.html // resolved relative to index.html url path – var worker = new Worker(‘worker.js’);….In above code, we are creating a web worker from file worker.js.
  • web-workers – |_ scripts – |_ main.js // to hold script for index.html – |_ workers – |_ for.js // to hold web worker code – |_ index.html // main pageFrom above structure of our application, index.html will import main.js which will create a web worker using the for.js script….
  • js’);// listen to message event of function(event) { – console.log(‘message received from workerFor = ‘, event.data); – });// listen to error event of function(event) { – console.error(‘error received from workerFor = ‘, event); – });From above code, we have created a web worker workerFor from script for.js.

Tags: web worker, web workers, main thread,


  • Reactive FormsUsageTo use it with Reactive Forms, we need to set the updateOn option to blur or submit when we instantiate a new FormControl ( the default option is change ) – this.email = new FormControl(null, { updateOn: ‘blur’ });Or with validators: – this.email = new FormControl(null, { – validators:…
  • For example: – this.login = new FormGroup({ – email: new FormControl(), – password: new FormControl() – }, { updateOn: ‘submit’ });onUpdate submitexampleIn the above example, both the controls will be updated on submit unless one of the children explicitly specified a different updateOn value.
  • For example: – this.login = new FormGroup({ – email: new FormControl(null, { – validators: Validators.required, – updateOn: ‘blur’ – }), – password: new FormControl(null, [Validators.required]) – }, {updateOn: ‘submit’})Forms ModuleUsageTo use it with the Forms Module, we need to set the updateOn option to blur or submit in ngModelOptions.
  • For example: – input type=email ngModel [ngModelOptions]={updateOn: ‘submit’}We can also use it to set the default updateOn values for all the form’s child – controls.
  • For example: – form [ngFormOptions]={updateOn: ‘submit’} – input name=email ngModel type=email – input name=password ngModel type=email – /formIn the above example, both the controls will be updated on submit unless one of the children explicitly set its own updateOn value in ngModelOption.

Tags: control validation process,


  • With the spiraling technology reaching new heights, there are many frameworks available for developers to create a unique and state of the art web as well as mobile applications.
  • ReactJS is a JavaScript library which is basically used to create user interfaces, whereas Anguar is a JavaScript-based web app framework.
  • AngularJS is probably the most popular open-source framework used by the developers for developing web applications and application program interfaces (APIs).
  • Simpler framework: The application program interfaces (APIs) in ReactJS are simpler and uncomplicated and thus, it proves to be a cakewalk for the developers for understanding the complex concepts easily.
  • Compared to ReactJS, Angular framework comes with numerous features that are available to developer: – – 1.

Tags: Search Engine Optimization, ReactJS, model view controller, framework, different attributes


  • Learn more about how can we install and implement Material Dashboard here: – – In this article, we are going to implement Material Sidenav and Material Datatable Starter Component one by one.
  • To work with Material Starter Component with the release of Angular 6.0, we should install it using the below ng command.
  • Basically, it is a tooling package which can be installed by using the node package manager, after completion of installation using the above command, now open package.json and you can see that two packages are updated @angular/material as well as @angular/cdk with the latest version 6.0.0.
  • Basically it contains a group of material components, and by combining it will generate side navigation with drawer component, and few of the components used are: – – The last move is to run thesidenav component that we have generated, to do this just open the app.component.html file and remove…
  • Using Material Datatable starter component, we can get a pre-configured datatable with assigned data and a few useful features like pagination, sorting by just running a single line of command.

Tags: starter component, material starter component, Angular Material Starter, material datatable starter, datatable starter component


Top Angular Courses

Angular 5 (formerly Angular 2) - The Complete Guide (139,105 students enrolled)

By Maximilian Schwarzmüller
  • Develop modern, complex, responsive and scalable web applications with Angular 4
  • Fully understand the architecture behind an Angular 4 application and how to use it
  • Use their gained, deep understanding of the Angular 4 fundamentals to quickly establish themselves as frontend developers
  • Create single-page applications with on of the most modern JavaScript frameworks out there

Learn more.


The Complete Angular Course: Beginner to Advanced (40,747 students enrolled)

By Mosh Hamedani
  • Establish yourself as a skilled professional developer
  • Build real-world Angular applications on your own
  • Troubleshoot common Angular errors
  • Master the best practices
  • Write clean and elegant code like a professional developer

Learn more.


Learn and Understand AngularJS (66,998 students enrolled)

By Anthony Alicea
  • Learn fundamental Javascript concepts that power AngularJS.
  • Write quicker, better AngularJS code by discovering how AngularJS itself is built.
  • Become fluent in AngularJS terminology, such as dependency injection, services, directives, transclusion, and more.
  • Realize the power of dependency injection, and how AngularJS accomplishes it.
  • Design custom directives and save time and energy with easily reusable components.
  • Understand what a Single Page Application (SPA) is, and how they work.
  • Build a Single Page Application (SPA) in AngularJS.
  • Be the coder that explains AngularJS to everyone else, because you understand it better than anyone else.
  • Get new free lectures during 2015, keep up with the development of AngularJS 2.0, and get a MASSIVE discount on a future AngularJS 2.0 course in 2016!

Learn more.


Angular 5 NgRx Store Masterclass & FREE E-Book (3,038 students enrolled)

By Angular University
  • Build a Chat Application From top to bottom!
  • Understand the Flux Architecture, its benefits, strong points and most beneficial use cases
  • Understand Single Store Architecture solutions like Redux or Ngrx Store
  • Know all the usual notions of Store solutions, like Actions and Reducers
  • Know how to model the application state of a single store architecture, leveraging Typescript custom types to do so
  • Know the difference between a model and a view model and what to put inside the store
  • know how to derive a view model from a model and how to do that
  • understand the notion of selector in the context of store solutions
  • know the difference between smart components and presentation components
  • know how to build smart components using the Ngrx Store library
  • know how to use the Ngrx Effects library
  • know not only the Ngrx libraries but know also how they all fit together and what are the benefits of a store solution
  • know how to setup the Ngrx store developers tools
  • know how to debug RxJs applications in general

Learn more.


Angular Front To Back (6,984 students enrolled)

By Brad Traversy
  • Build amazing single page applications using Angular 5+
  • Master Angular concepts
  • Understand the file and folder structure of an Angular application
  • Build a client management application with authentication and Firebase's Firestore
  • Integrate Bootstrap 4 into Angular projects

Learn more.


Angular Crash Course for Busy Developers (44,316 students enrolled)

By Mosh Hamedani
  • Master the essential Angular concepts
  • Troubleshoot common runtime errors
  • Write cleaner, more maintainable code

Learn more.


Angular (Angular 2+) & NodeJS - The MEAN Stack Guide (26,806 students enrolled)

By Maximilian Schwarzmüller
  • Build real Angular + NodeJS applications
  • Understand how Angular works and how it interacts with Backends
  • Connect any Angular Frontend with a NodeJS Backend
  • Use MongoDB with Mongoose to interact with Data on the Backend
  • Use ExpressJS as a NodeJS Framework
  • Provide a great user experience by using Optimistic Updating on the Frontend
  • Improve any Angular (+ NodeJS) application by adding Error Handling

Learn more.