Found 54 Articles for AngularJS

How to display tables using AngularJS?

Sravani Alamanda
Updated on 21-Feb-2023 18:14:43

2K+ Views

The data in tables are basically repeatable. In AngularJS, a better way to display tables is the ng-repeat directive. The ng-repeat directive will help us to loop through the array data in the DOM elements and helps us to display tables very easily. Let’s check how to use ng-repeat for creating tables. Ng-repeat The ng-repeat directive repeats a set of HTML, a given number of times. The set of HTML will be repeated once per item in a collection. The collection must be an array or an object. Syntax Here, to create tables follow given steps. Set ... Read More

How to create custom directives in Angular 8?

Sravani Alamanda
Updated on 21-Feb-2023 16:53:04

288 Views

In Angular, directives are one of the most important elements. Directives are building blocks like components in angular framework to build application. A directive used to modify the DOM by changing the appearance, behavior, or layout of DOM elements. Directives are used to provide or generate new HTML based syntax which will extend the power of the UI in an Angular Application. Each and every directive must have a selector same like a component. In simple words, every component in angular is a directive with the custom HTML template. In angular, we have directives to change the behavior or ... Read More

How to add event listeners in HTML using AngularJS?

Sravani Alamanda
Updated on 21-Feb-2023 16:47:58

3K+ Views

In AngularJS, events help us to perform particular tasks, based on the action. AngularJS is rich in events and has a simple model for adding event listeners to the HTML. AngularJS supports many events related to the mouse and keyboard. All these events are applied to the HTML elements. In angularJs, we have many HTML events. Suppose we write both AngularJS and HTML events simultaneously. AngularJS event and HTML event will be executed and AngularJS event will not overwrite the HTML event. Events can be represented by using directives. Like ng-click, ng-change, ng-mousedown, ng-mouseup, ng-keydown, ng-keyup, ng-keypress, ng-mouseover, ng-paste etc. ... Read More

How to setup Video.js with AngularJS?

Prince Yadav
Updated on 11-Nov-2022 07:15:07

2K+ Views

Video.js is a modern web video player which is used for creating video players for different video playback formats. It supports all the modern video formats like Youtube, Vimeo, Flash, etc along with all the standard video playback formats like mp4, webm, flv, etc. Video.js can be integrated with a wide range of popular frameworks like React, Angular, etc. In this article, we'll specifically learn how to set up video.js with AngularJS. We'll create a video.js component using AngularJS and then use it in our project. How to set up Video.js with AngularJS? For using video.js with AngularJS, we need ... Read More

Difference between JavaScript and AngularJS

Pradeep Kumar
Updated on 10-Aug-2022 07:17:29

4K+ 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 that is most ... Read More

What are the differences between AngularJs and Google Web Toolkit (GWT)?

Bhanu Priya
Updated on 23-Mar-2022 10:37:11

214 Views

Let us understand the concepts of AngularJS and Google Web Toolkit (GWT) before learning the differences between them.Google Web ToolkitIt is an open-source set of tools which allows creating and maintaining JavaScript front-end applications in Java by the web developers. It was launched in the year 2006 by Google and the code is written in Java.The operating system that supports GWT is Linux, Windows, OS X, FreeBSD. It helps in creating RICH Internet Applications. It helps in converting java source code to equivalent JavaScript.FeaturesThe features of Google Web Toolkit are as follows −DynamicReusable UI componentsSimple RPC mechanismBrowser history managementSupport for ... Read More

angularjs – ng-class Directive

Mayank Agarwal
Updated on 08-Oct-2021 13:45:35

555 Views

The ng-class Directive in angularjs allows the user to dynamically set the CSS classes on an HTML element by databinding an expression which will further represent all those classes to be added. The class is only added if the expression inside the ngClass Directive returns True, else it will not be added. It is supported by all the HTML elements.The directive does not set any duplicate class if it was already set. When the expression changes, the previously added classes will be removed and the new classes will be added only after that.Syntax..Content..Example − ngClass DirectiveCreate a file "ngClass.html" in ... Read More

AngularJS – ng-mousedown Directive

Mayank Agarwal
Updated on 08-Oct-2021 13:33:17

246 Views

The ng-mousedown Directive in AngularJS basically specifies a custom event on mouse-down event. We can perform multiple functions whenever the mouse is pressed and the mouse-down event is called.Syntax..content..Example − ngMousedown DirectiveCreate a file "ngMousedown.html" in your Angular project directory and copy-paste the following code snippet.           ngMousedown Directive                              Welcome to Tutorials Point                      angularjs | ngMousedown Directive                                   Click mouse and hold !!!                 OutputTo run the above code, just go to your file and run it as a normal HTML file.Your browser does not support HTML5 video.

AngularJS – ng-app Directive

Mayank Agarwal
Updated on 08-Oct-2021 13:23:32

259 Views

The ng-app Directive in AngularJS is used for auto-bootstraping of an AngularJS application. This directive gives the root element of the application and is generally placed near the root element of the page like on the  or tags. This directive declares the root context from where the application will be started.Points to note while using the ngApp Directive −Only one application can be bootstrapped per the HTML element. If you declare multiple ngApp components, the first ngApp appearing element will be considered as the root element for auto-bootstrap. For running multiple applications in the HTML, one should use the ... Read More

AngularJS – angular.element() function

Mayank Agarwal
Updated on 08-Oct-2021 13:16:08

1K+ Views

The angular.element() method wraps the raw DOM element or the HTML string as a jQuery element. If jQuery is available or imported, angular.element is an alias for the jQuery function, else this method delegates to AngularJS’s built-in subset of jQuery called jQueryLite or jqLite.Syntaxangular.element(element)Example − Wrapping the DOM element using angular.element()Create a file "element.html" in your Angular project directory and copy-paste the following code snippet.           angular.element()                              Welcome to Tutorials Point           ... Read More

Advertisements