Skip to content
Related Articles

Related Articles

AngularJS | angular.isElement() Function

View Discussion
Improve Article
Save Article
  • Last Updated : 12 Apr, 2019

The angular.isElement() Function in AngularJS is used to determine if the parameter inside isElement function is a HTML DOM element or not. It returns true if the reference is a DOM element else false.



Return Value: It returns true if the value passed is a HTML DOM element else false.


<!DOCTYPE html>
    <script src=
<body ng-app="testApp" 
    <h1 style="color:green">
    <div ng-controller="geek">
            {'destroy': true, 'create': false}
        <b>isElement:</b> {{ isElement1 }}
        <b>isElement:</b> {{ isElement2 }}
        <button id="myButton"> Button</button>
        var app = angular.module('testApp', []);
        app.controller('geek', function($scope) {
            $scope.obj1 = {
                'destroy': true,
                'create': false
            $scope.obj2 = document.getElementById('myButton');
            $scope.isElement1 = 
            $scope.isElement2 = 


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!