AngularJS Articles

Found 46 articles

Difference Between String Slice and Substring Methods

Pradeep Kumar
Pradeep Kumar
Updated on 15-Mar-2026 2K+ Views

JavaScript provides several built-in methods for string manipulation. Two commonly used methods are slice() and substring(), which extract portions of strings. While they appear similar, they handle edge cases differently, particularly with negative indices. String slice() Method The slice() method extracts a section of a string and returns it as a new string without modifying the original string. Syntax string.slice(start, end) Parameters start: The index where extraction begins (inclusive) end (optional): The index where extraction ends (exclusive) String substring() Method The substring() method ...

Read More

Difference between JavaScript and AngularJS

Pradeep Kumar
Pradeep Kumar
Updated on 15-Mar-2026 5K+ Views

JavaScript is a scripting language that is used to generate dynamic HTML pages with interactive effects on a webpage that runs in the web browser of the client. On the other hand, Angular JS is a framework that is built on JavaScript and adds new functionalities to HTML. Its primary purpose is to facilitate the creation of dynamic and single-page web applications (SPAs). In this article, we are going to highlight the differences between Angular JS and JavaScript. Let's start with a basic understanding of JavaScript and AngularJS. What is JavaScript? JavaScript is a simple programming language ...

Read More

How to Install & Setup MEAN Stack on Ubuntu (MongoDB, Express.JS, Angular.JS, Node.JS)

Satish Kumar
Satish Kumar
Updated on 15-Mar-2026 1K+ Views

The MEAN stack is a popular web development framework consisting of MongoDB, Express.js, Angular.js, and Node.js. It is an open-source platform that allows developers to create robust web applications quickly and efficiently. In this article, we will guide you through the installation and setup process of the MEAN stack on Ubuntu. Step 1: Install Node.js and NPM Node.js is the runtime environment that allows developers to run JavaScript code outside of the browser. It is the backbone of the MEAN stack. To install Node.js on Ubuntu, follow these steps − Open the terminal on Ubuntu by pressing ...

Read More

How to Filter an Array based on the user input in AngularJS ?

Aman Gupta
Aman Gupta
Updated on 13-Oct-2023 409 Views

Overview An array can be a collection of anything but should be of the same data type. We can store any digit and text of the array, so to filter the data from an array using the AngularJs can be achieved by some key value attributes pair. The filter rule plays a key role to create this feature, there are also some AngularJs attributes that play a major role to build this feature these are: ng−model and ng−repeat. The ng−model attribute defines the input type text search box to connect with the ordered list and filter it out an array. ...

Read More

How to Count Array Items in Angular JS?

Jaisshree
Jaisshree
Updated on 18-Aug-2023 5K+ Views

A well−liked JavaScript framework for creating dynamic web apps is AngularJS. It offers a variety of helpful array−related tools, such as ways to measure the number of items in an array. In this article, we'll look into using AngularJS to count the number of items in an array. Method 1: Using the length property Using the built−in length property is the quickest and most popular method to count the number of items in an array in AngularJS. The length property gives the array's total amount of items. Algorithm Start Define an array 'myArray' and assign it to a ...

Read More

How to Encode/Decode URL using AngularJS ?

Jaisshree
Jaisshree
Updated on 09-Aug-2023 1K+ Views

Handling URLs, which are used to move between various web pages and parts, is a fundamental component of web development. Spaces, question marks, and ampersands, among other special characters, can cause problems in URLs when transmitted over the internet. For instance, certain web servers may behave unexpectedly if a URL contains a space, supposing it to be a separate command or argument. AngularJS is a popular JavaScript framework used for building single−page applications. It provides several built−in methods for URL encoding and decoding, making it easy for developers to handle URLs in their applications. We will explore different methods ...

Read More

How to dynamically get the content height of a div using AngularJS?

Dishebh Bhayana
Dishebh Bhayana
Updated on 03-Aug-2023 1K+ Views

In this article, we will explore how to dynamically get the content height of a HTML element using AngularJS, using its getContentHeight() function. In web development, there are often situations where we need to dynamically determine the height of a element based on its content. We can easily implement it with the help of AnguarlJS, a popular javascript framework, and the various utility functions provided by it. Let’s understand how to implement the above with the help of some examples. Example 1 In this example, we will add an ng-init="getContentHeight()" to the element, which calls the getContentHeight() ...

Read More

How to Display Spinner on the Screen till the data from the API loads using Angular 8?

Dishebh Bhayana
Dishebh Bhayana
Updated on 03-Aug-2023 907 Views

In this article, we will learn how to display a spinner on the screen till the data gets loaded from an API, using Angular 8 and the HTTPClient service to fetch data from a dummy todos API. Angular 8 is a robust framework for building web applications. It offers many features that make creating dynamic and interactive user interfaces easy. Let’s use the framework and understand how to show a spinner component conditionally using an example. Prerequisites Before proceeding with the steps below, please ensure you have angular CLI installed on your systems, as we would be relying ...

Read More

How to disable buttons using AngularJS?

Dishebh Bhayana
Dishebh Bhayana
Updated on 02-Aug-2023 2K+ Views

In this article, we will learn how to disable button HTML elements using angularJS with the help of the “ng-disabled” angularJS directive. Disabled buttons can be useful in cases of forms that have some validation required on some input fields. For example, a form with the name and email required should not ideally have the submit button enabled until those required fields are provided with some values. In these types of cases, we can disable and enable the button dynamically to achieve the desired outcome. Here, we will use the “ng-disabled” angular directive to disable a button. The directive accepts ...

Read More

How to replace a string by another string in Angular JS?

Mohit Panchasara
Mohit Panchasara
Updated on 26-Jul-2023 1K+ Views

Angular JS is a popular JavaScript framework that offers developers a range of useful tools for creating dynamic web applications. A common requirement in web development is to change specific words or phrases within a given text. In this tutorial, we will explain how to replace one string with another using AngularJS. We will provide clear, step-by-step instructions to accomplish this task effectively. To make it easier to understand, we will use a practical example to demonstrate the powerful features of Angular JS for string replacement. Importance of Replacing a String Before we explore the technical aspects, let's first grasp ...

Read More
Showing 1–10 of 46 articles
« Prev 1 2 3 4 5 Next »
Advertisements