Angular ViewChild decorator makes it possible to access a directive assigned to a particular element in the template. You could also use it to access a child component, or a DOM element from a parent component class together with ElementRef. It’s used to reference or access template Dom elements and directives that belong to the same component. It’s also used…
Category: Web Development
How to replace character inside a string in JavaScript
Javascript replace character in a string at index or with regular expression using the string replace() function which is used to replace the first occurrence of value in a string. To use the same function to replace all the instances of a character, you can use a regular expression with the (g) flag or modifier set. The syntax is string.replace(searchValue,…
Java interface examples
Interfaces in Java what is an interface in java? Java interface is termed as a complete abstract type used to specify the behavior of a class. Interface is just like an abstract class, the difference is that, whiles abstract class can have non-abstract methods, all methods in interface are abstract, therefore it used to achieve total abstraction. It provides full…
PHP vs ASP.NET: Which one to choose for web application development?
Which platform will you pick for your project in 2022? PHP or ASP.NET? That’s a complex question to answer. Isn’t it? Knowing that both of the platforms possess great business values and are widely used, selecting one of them over the other one is challenging. Both of the platforms can fulfill your needs but in different directions. If you are…
Angular disable button clicks and on condition example
Angular disable button clicks and on condition example, full step-by-step guide. Sometimes it will be very beneficial for you to disable certain buttons for a while until certain task is successfully completed. For example, you can disable the submit button on the registration page after the user clicks on it during http request and wait for 5 seconds until you…
Typescript Tuples: Explained (With Examples)
Typescript Tuples are special types that is used to define types for each element in an array. There are different data-types available in typescript for performing high complex operations including, string, number, interface, any, Boolean, object, arrays and interface. You can use arrays as stack to define list of items of the same types, but what if you want each…
Cannot make a static reference to the non-static method or fields: error (fixed)
When you create a new Java program and you initialize a variable or method outside the main method, and you try to execute or reference it, you will encounter a compile time error “Cannot make a static reference to the non-static method or a non-static field”. It doesn’t matter what programming language you use either c#, JavaScript, python, C++ or…
How Long Does It Take to Learn JavaScript?
How long does it take to learn JavaScript for beginners and the time required to get a job? It will take you approximately six to nine months for you to learn JavaScript and master it syntax and fundamentals such as object, closure, promises and callbacks. But if you already know a different programming language like python it won’t take you…
Source Code and Object Code Difference
Source code and object code are two different programming statements with one created by a computer programmer with a text editor like visual studio code and saved in a file. Object code is the output of a source code compiled into a machine code that contains a sequence of machine-readable instructions with Java or C compiler which is processed by…
How Much Does A Computer Coder Make? Programmers Salary
How much do coders make in computer programming? Coders earn a minimum of $3000 per month. However, it mainly depends on the location of the programmer and the terms of the company he or she is working for.