Author Archives: Ajitesh Kumar

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking.

Angular – Best Practices to Capture User Inputs

This blog represents a list of recommendations for capturing user inputs from a form in an Angular app. One should make use of template reference variable instead of the $event object to refer to the input element in order to capture user inputs from forms. Following represents the usage of template reference variable. The following represents usage of $event object (not recommended): When using the template reference variable, the “value” should be passed rather than passing elements. The following represents usage of passing by value: Keep template statements simple. The following represents two statements on keyup event, one to pass the value and second to clear the field. In case …

Continue reading

Posted in AngularJS, Web. Tagged with , , .

Top 13 Online Platforms providing IT Courses

Online Courses Reskilling

In this age when everyone is talking about reskilling and upskilling, online platforms such as coursera.org, Khan Academy has taken a strong foothold in providing online education to knowledge seekers worldwide. The following is a list of some of the most popular online platforms or websites/web apps which can be used for self-paced learning or training or reskilling yourself in different technologies including AI (machine learning), Web and Mobile programming languages and related frameworks, Blockchain, Virtual Reality etc. Please feel free to suggest one or more online platforms which I did not mention. Coursera – https://www.coursera.org/ Khan Academy – https://www.khanacademy.org/ Codecademy – https://www.codecademy.com/ edX – https://www.edx.org/ Udacity – https://www.udacity.com/ Udemy …

Continue reading

Posted in News, Online Courses. Tagged with , , , .

Go – How to Create a Package in Go Language

This blog represents code samples and related concepts on how to create a package or library using GO programming language. Create a HelloWorld Package Save the following code within some file such as hello.go within some package folder such as helloworld within folder $GOPATH/src. Create the package using command such as go install helloworld. Alternatively, go inside the folder helloworld and execute the command, go install. This would lead to creation of *.a file within $GOPATH/pkg folder. Note that command such as go build can be used to compile and check if there are any errors. Pay attention to some of the following: The methods to be exported MUST start …

Continue reading

Posted in Go. Tagged with .

Blockchain Usecase – Freelancer to Benefit Lot More

Blockchain has been revolutionizing different kind of businesses including financial, banking, supply chain management etc. Given the very nature of this Blockchain technology, it is also going to disrupt freelance industry benefiting mostly the freelancers. And, this blockchain network implementation most probably looks to be a public blockchain which can be implemented using platform such as ethereum. Following are some of the platforms which are already working on this idea of using Blockchain for freelancing: Ethlance.com: Ethlance is a first of its kind platform for connecting freelancers and developers. It has its database running completely on Ethereum public blockchain and front-end source files distributed on IPFS, that means it’s completely …

Continue reading

Posted in BlockChain, News. Tagged with , .

Angular Error – No directive with exportAs set to ngForm

While running unit tests for the Angular app (Angular 2/Angular 4), I came across the error such as following: Failed: Template parse error: There is no directive with “exportAs” set to “ngForm” Here is the screenshot of the error. Note that the form referenced in this blog is a template-driven form. This blog represents the resolution of above error. Template and Unit Test Code Before the Fix The template code defined the template reference variable, #signupForm, for form element as shown in the following code. Following was the unit test code prior fix/resolution: Unit Test Code after the Fix/Resolution Pay attention to the inclusion of FormsModule in imports array. In …

Continue reading

Posted in AngularJS, Javascript, Web. Tagged with , , , .

Angular – Use Template Reference Variable for User Inputs

This blog represents tips and code sample for using Template reference variable for capturing user inputs in an Angular form. Template code for Template Reference Variable The following code represents the template file, app.component.html. Component code for Template Reference Variable The following represents the component code, app.component.ts: In case you are developing web apps using Spring and Angular, check out my book, Building web apps with Spring 5 and Angular. Grab your ebook today and get started.

Posted in AngularJS, Web. Tagged with , .

Angular – Signup Form Code Sample

Angular Signup Form Template

This blog represents code samples and related concepts which can be used to create a Signup form in Angular (Angular 2/Angular 4).In order to create signup form, following code is required to be written: Model class for Signup Template (UI) code for Signup Component code for handling Signup Form Style code for visually handling input validation Module code that includes the SignupComponent This is how the screenshot of the Signup form looks like: Following are different files which may need to be created to manage signup module: signup.ts (Model class) signup.component.ts (Component) signup.component.html (Template) signup.component.css (CSS styles that are used in template) app.module.ts or signup.module.ts (in case, signup is a …

Continue reading

Posted in AngularJS, Web. Tagged with , .

Top 3 Javascript Frameworks for 2018 – Angular, ReactJS, VueJS

From trends data retrieved from sources such as Google, Stackoverflow etc., it is seeming as if the javascript framework of choice for developing your next web app has to be in one of the following. As of today, these are top three javascript frameworks trending on Google, Stackoverflow etc. Angular/AngularJS ReactJS VueJS Google Web Search Trends – Angular, ReactJS, VueJS StackOverflow Q&A Trends – Angular, ReactJS, VueJS

Posted in News. Tagged with , , , , .

How to Upgrade from Angular 2 to Angular 5 Apps

This blog represents steps required to upgrade or update or migrate existing Angular 2 apps to Angular 5 apps. Greater details can be found on Angular 5 announcement blog. Upgrade/Update Preparation from Angular 2 to Angular 5 Apps The following are some of the activities which are recommended before the update/upgrade is done: Ensure that extends with lifecycle events are replaced with implements <lifecycle event> In case animation is used in the app, BrowserAnimationsModule from @angular/platform-browser/animations needs to be imported in NgModule OpaqueTokens should be replaced with InjectionTokens Rename the template tags to ng-template tag Update package.json file appropriately to update dependencies and devDependencies Update Package.json file for Dependencies/DevDependencies It is important to update package.json file for upgrading angular apps using Angular 4 …

Continue reading

Posted in AngularJS, Javascript, Web. Tagged with , , , .

Oct 2017 – Angular Vs ReactJS – Which one was Popular?

This page represents the popularity of Angular vs ReactJS in October 2017 from different sources including Google Trends etc. It is evident that Angular is seeing greater adoption followed by ReactJS. It is also interesting to note from search keywords trends that Vue.js. Another key observation is the interview questions which developers are seeking in relation with Angular. Google Trends – Angular vs ReactJS Google Popular Search Keywords – Angular vs ReactJS

Posted in News. Tagged with , , , .

Angular – Two Ways to Capture User Inputs

This blog represents concepts and code samples which can be used for capturing user inputs from the form in an Angular app using following techniques: Using $event object Using template reference variable Using $event in template statement The following depicts the code which needs to be used in template code. Make a note of The following depicts the code which needs to be used in the component code. Using Template Reference Variables The following depicts the code which needs to be used in template code. Make a note of usage of # (hash) with the template reference variable, email. The reference variable, #email, represents the input element. The following depicts …

Continue reading

Posted in AngularJS, Web. Tagged with .

Angular Unit Testing Interview Questions – Set 2

This quiz provides basic questions in relation to Angular unit testing. The following are some of the concepts which are covered in this quiz. Angular unit testing fundamentals Angular testing utilities – TestBed [wp_quiz id=”5464″]

Posted in AngularJS, Career Planning, Interview questions, Javascript, Web. Tagged with , , , .

Angular Bootstrap Responsive Template – Code Sample

Following code can be placed in the index.html file to adopt Bootstrap 4.* with Angular App (Angular 2 or Angular 4) after you have created an Angular app using Angular CLI commands such as “ng new projectName” which is used for creating a new Angular project. Pay attention to some of the following: Responsiveness is achieved using following code: Bootstrap CSS library is included within head tag. Bootstrap Javascript (optional) is included as part of Body tag In case you are developing web apps using Spring and Angular, check out my book, Building web apps with Spring 5 and Angular. Grab your ebook today and get started.

Posted in AngularJS, Web. Tagged with .

Angular – How to Handle Password Confirmation Logic

Password Confirmation Logic in Angular Form

This blog represents code samples and related concepts on how to handle password confirmation logic in an Angular app (Angular 2/Angular 4). Note that the code samples make use of template-driven forms and uses [(ngModel)] for two-way data bindings. Following are key aspects discussed in this blog: Template code for handling password confirmation logic Component code for handling password confirmation logic Signup model code In this blog, it is considered that password confirmation logic is a key part of signup form. Thus, a model name Signup is used. However, the logic can also be used in update password form. Following screenshot represents password confirmation UI related with the code given …

Continue reading

Posted in AngularJS, Javascript, Web. Tagged with , , , .

How to Upgrade Angular 4 to Angular 5 Apps

This blog represents steps required to upgrade or update or migrate existing Angular 4 apps to Angular 5 apps. Greater details can be found on Angular 5 announcement blog. I must tell you that upgrading from angular 4 to angular 5 is not like the one represented below (from AngularJS to Angular 2.* and later versions). In this post, you will learn about some of the following: Preparation for upgrading from Angular 4 to Angular 5 Running the upgrade activity Post-upgrade activities Testing the Angular 5 App Upgrade/Update Preparation from Angular 4 to Angular 5 Apps The following are some of the activities which are recommended before the update/upgrade is done: Rename …

Continue reading

Posted in AngularJS, Javascript, Web. Tagged with , , , , .

Angular Unit Testing Interview Questions – Set 1

This quiz provides basic questions in relation to Angular unit testing. The following are some of the concepts which are covered in this quiz. Angular unit testing fundamentals Angular unit testing tools (Karma & Protractor) Angular testing utilities – TestBed [wp_quiz id=”5463″]

Posted in AngularJS, Career Planning, Interview questions, Javascript, Web. Tagged with , , , .