<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HTML DOM in Angular JS &#8211; Sibeesh Passion</title>
	<atom:link href="https://sibeeshpassion.com/tag/html-dom-in-angular-js/feed/" rel="self" type="application/rss+xml" />
	<link>https://sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Thu, 20 Aug 2015 05:23:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>HTML DOM in Angular JS &#8211; Sibeesh Passion</title>
	<link>https://sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Learning AngularJS: HTML DOM</title>
		<link>https://sibeeshpassion.com/learning-angularjs-html-dom/</link>
					<comments>https://sibeeshpassion.com/learning-angularjs-html-dom/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Wed, 29 Apr 2015 20:21:03 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[Angular JS]]></category>
		<category><![CDATA[HTML Dom]]></category>
		<category><![CDATA[HTML DOM in Angular JS]]></category>
		<category><![CDATA[Learning Angular JS]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=1601</guid>

					<description><![CDATA[Today we will learn about Angular JS HTML DOM elements. We will be discussion about ng-disabled, ng-show, ng-hide, ng-show-conditional expression in this article. These are the tags we can use for manipulating our dom elements. It is very easy to handle these tags. We will explain this with examples. I hope you will like this article. If you are new to Angular JS then I suggest you read the basics of Angular JS here: Basics of AngularJS AngularJS Search Box Using Filter Learning AngularJS: $http Using the code The ng-disabled directive normally binds the data to the disabled property of [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Today we will learn about Angular JS HTML DOM elements. We will be discussion about ng-disabled, ng-show, ng-hide, ng-show-conditional expression in this article. These are the tags we can use for manipulating our dom elements. It is very easy to handle these tags. We will explain this with examples. I hope you will like this article. </p>
<p>If you are new to Angular JS then I suggest you read the basics of Angular JS here: </p>
<li><a href="http://sibeeshpassion.com/basics-of-angularjs/" target="_blank">Basics of AngularJS</a></li>
<li><a href="http://sibeeshpassion.com/angularjs-search-box-using-filter/" target="_blank">AngularJS Search Box Using Filter</a></li>
<li><a href="http://sibeeshpassion.com/learning-angularjs-http/" target="_blank">Learning AngularJS: $http</a></li>
<p><strong>Using the code</strong></p>
<p>The ng-disabled directive normally binds the data to the disabled property of our HTML elements. The following is the example for that.</p>
<p>[html]<br />
&lt;b&gt;ng-disabled&lt;/b&gt;<br />
&lt;div ng-app=&quot;&quot;&gt;<br />
   &lt;p&gt;<br />
      &lt;input type=&quot;checkbox&quot; ng-model=&quot;myVal&quot; /&gt;Please enable me<br />
   &lt;/p&gt;<br />
   &lt;p&gt;<br />
      &lt;button ng-disabled=&quot;!myVal &quot;&gt;Wow! You enabled me :)&lt;/button&gt;<br />
   &lt;/p&gt;<br />
&lt;/div&gt;<br />
[/html]</p>
<p>Here we have a model that is a check box. What we do is, whenever a user clicks that checkbox we are applying that value to the ng-disabled property of the button. Please see the following output.</p>
<div id="attachment_9861" style="width: 186px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS1.jpg"><img decoding="async" aria-describedby="caption-attachment-9861" src="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS1.jpg" alt="Learning AngularJS" width="176" height="115" class="size-full wp-image-9861" /></a><p id="caption-attachment-9861" class="wp-caption-text">Learning AngularJS</p></div>
<div id="attachment_9871" style="width: 184px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS2.jpg"><img decoding="async" aria-describedby="caption-attachment-9871" src="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS2.jpg" alt="Learning AngularJS" width="174" height="118" class="size-full wp-image-9871" srcset="/wp-content/uploads/2015/04/Learning-AngularJS2.jpg 174w, /wp-content/uploads/2015/04/Learning-AngularJS2-160x110.jpg 160w" sizes="(max-width: 174px) 100vw, 174px" /></a><p id="caption-attachment-9871" class="wp-caption-text">Learning AngularJS</p></div>
<p>Now we will explain ng-show.</p>
<p>The ng-show shows or hides the HTML controls depending on the ng-show value.</p>
<p>Please see the following example.<br />
[html]<br />
&lt;b&gt;ng-show&lt;/b&gt;<br />
&lt;p&gt;<br />
      &lt;input type=&quot;checkbox&quot; ng-model=&quot;showhide&quot; /&gt;Please show me<br />
&lt;/p&gt;<br />
&lt;p ng-show=&quot;showhide&quot;&gt;Am I visible? {{showhide}}&lt;/p&gt;<br />
[/html]</p>
<p>In the preceding example we are taking the value from the model showhide and applying to the ng-show.</p>
<p>Please see the output below.</p>
<div id="attachment_9881" style="width: 149px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS3.jpg"><img decoding="async" aria-describedby="caption-attachment-9881" src="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS3.jpg" alt="Learning AngularJS" width="139" height="107" class="size-full wp-image-9881" /></a><p id="caption-attachment-9881" class="wp-caption-text">Learning AngularJS</p></div>
<div id="attachment_9891" style="width: 154px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS4.jpg"><img decoding="async" aria-describedby="caption-attachment-9891" src="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS4.jpg" alt="Learning AngularJS" width="144" height="78" class="size-full wp-image-9891" /></a><p id="caption-attachment-9891" class="wp-caption-text">Learning AngularJS</p></div>
<p>You can apply any expression also. We will discuss that in the following example.<br />
[html]<br />
&lt;b&gt;ng-show-Conditional expressions&lt;/b&gt;<br />
&lt;div ng-init=&quot;isAdmin=true&quot;&gt;<br />
       &lt;p ng-show=&quot;isAdmin == true&quot;&gt;Admin User&lt;/p&gt;<br />
&lt;/div&gt;<br />
[/html]</p>
<p>The preceding will show the output as:</p>
<div id="attachment_9901" style="width: 241px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS5.jpg"><img decoding="async" aria-describedby="caption-attachment-9901" src="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS5.jpg" alt="Learning AngularJS" width="231" height="79" class="size-full wp-image-9901" /></a><p id="caption-attachment-9901" class="wp-caption-text">Learning AngularJS</p></div>
<p><strong>ng-hide</strong></p>
<p>The ng-hide directive is the same as the ng-show:<br />
[html]<br />
&lt;b&gt;ng-hide&lt;/b&gt;<br />
&lt;p ng-hide=&quot;true&quot;&gt;Not visible.&lt;/p&gt;<br />
&lt;p ng-hide=&quot;false&quot;&gt;Visible.&lt;/p&gt;<br />
[/html]</p>
<p>In the preceding example we are applying the ng-hide value directly. We can use the ng-model for the same as we discussed in the preceding examples.</p>
<p>This will return the output as follows.</p>
<div id="attachment_9911" style="width: 92px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS6.jpg"><img decoding="async" aria-describedby="caption-attachment-9911" src="http://sibeeshpassion.com/wp-content/uploads/2015/04/Learning-AngularJS6.jpg" alt="Learning AngularJS" width="82" height="78" class="size-full wp-image-9911" /></a><p id="caption-attachment-9911" class="wp-caption-text">Learning AngularJS</p></div>
<p><strong>Complete HTML</strong><br />
[html]<br />
&lt;!DOCTYPE html&gt;<br />
&lt;html<br />
    xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
    &lt;head&gt;<br />
        &lt;title&gt;Angular JS HTML Dom &#8211; www.sibeeshpassion.com&lt;/title&gt;<br />
        &lt;script src=&quot;angular.min.js&quot;&gt;&lt;/script&gt;<br />
    &lt;/head&gt;<br />
    &lt;body&gt;<br />
        &lt;b&gt;ng-disabled&lt;/b&gt;<br />
        &lt;div ng-app=&quot;&quot;&gt;<br />
            &lt;p&gt;<br />
                &lt;input type=&quot;checkbox&quot; ng-model=&quot; myVal &quot; /&gt;Please enable me<br />
            &lt;/p&gt;<br />
            &lt;p&gt;<br />
                &lt;button ng-disabled=&quot;!myVal &quot;&gt;Wow! You enabled me :)&lt;/button&gt;<br />
            &lt;/p&gt;<br />
            &lt;b&gt;ng-show&lt;/b&gt;<br />
            &lt;p&gt;<br />
                &lt;input type=&quot;checkbox&quot; ng-model=&quot;showhide&quot; /&gt;Please show me<br />
            &lt;/p&gt;<br />
            &lt;p ng-show=&quot;showhide&quot;&gt;Am I visible? {{showhide}}&lt;/p&gt;<br />
            &lt;b&gt;ng-show-Conditional expressions&lt;/b&gt;<br />
            &lt;div ng-init=&quot;isAdmin=true&quot;&gt;<br />
                &lt;p ng-show=&quot;isAdmin == true&quot;&gt;Admin User&lt;/p&gt;<br />
            &lt;/div&gt;<br />
            &lt;b&gt;ng-hide&lt;/b&gt;<br />
            &lt;p ng-hide=&quot;true&quot;&gt;Not visible.&lt;/p&gt;<br />
            &lt;p ng-hide=&quot;false&quot;&gt;Visible.&lt;/p&gt;<br />
        &lt;/div&gt;<br />
    &lt;/body&gt;<br />
&lt;/html&gt;<br />
[/html]</p>
<p><strong>Conclusion</strong></p>
<p>Now that is all for today, I will return with another set of items in Angular JS soon. I hope you liked this article. Please provide your valuable suggestions.</p>
<p>Kindest Regards<br />
Sibeesh venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sibeeshpassion.com/learning-angularjs-html-dom/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
