<?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>Learning Angular JS &#8211; Sibeesh Passion</title>
	<atom:link href="https://sibeeshpassion.com/tag/learning-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:33:39 +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>Learning 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>
		<item>
		<title>Learning AngularJS: $http</title>
		<link>https://sibeeshpassion.com/learning-angularjs-http/</link>
					<comments>https://sibeeshpassion.com/learning-angularjs-http/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Sun, 29 Mar 2015 20:18:58 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[$http]]></category>
		<category><![CDATA[$http in Angular JS]]></category>
		<category><![CDATA[Angular JS]]></category>
		<category><![CDATA[http variable]]></category>
		<category><![CDATA[Learning Angular JS]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=1561</guid>

					<description><![CDATA[Hi all, I hope you are fine. Today we will learn about AngularJS Basic $http. If you are new to AngularJS then I suggest you read the Basics of AngularJS. Now with the assumption that you have read my previous article, we are starting. This article explains $http in Angular JS. Using the code $http is a service for reading data from web services. It uses the get (service URL) method for the process. We will see that with an example. [html] &#60;div ng-app=&#34;httpApp&#34; ng-controller=&#34;httpController&#34;&#62; &#60;ul&#62; &#60;li ng-repeat=&#34;det in details&#34;&#62;{{ det.name + &#8216;, &#8216; + det.countrycode }} &#60;/li&#62; &#60;/ul&#62; &#60;/div&#62; [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi all, I hope you are fine. Today we will learn about AngularJS Basic $http. If you are new to AngularJS then I suggest you read the <a href="http://sibeeshpassion.com/basics-of-angularjs/" target="_blank">Basics of AngularJS</a>.</p>
<p>Now with the assumption that you have read my previous article, we are starting.</p>
<p>This article explains $http in Angular JS.</p>
<p><strong>Using the code</strong></p>
<p>$http is a service for reading data from web services. It uses the get (service URL) method for the process. We will see that with an example.<br />
[html]<br />
&lt;div ng-app=&quot;httpApp&quot; ng-controller=&quot;httpController&quot;&gt;<br />
    &lt;ul&gt;<br />
        &lt;li ng-repeat=&quot;det in details&quot;&gt;{{ det.name + &#8216;, &#8216; + det.countrycode }}<br />
&lt;/li&gt;<br />
    &lt;/ul&gt;<br />
&lt;/div&gt;<br />
[/html]</p>
<p>In the preceding code, we have an Angular app httpApp and a controller httpController. Now we need to create our controller part, right?<br />
[js]<br />
&lt; script &gt;<br />
var app = angular.module(&#8216;httpApp&#8217;, []);<br />
app.controller(&#8216;httpController&#8217;, function($scope, $http) {<br />
    $http.get(&quot;http://api.geonames.org/citiesJSON?north=44.1&amp;south=-9.9&amp;east=- 22.4&amp;west=55.2&amp;lang=de&amp;username=demo&quot;)<br />
        .success(function(response) {<br />
        $scope.details = response.geonames;<br />
    });<br />
}); &lt; /script&gt;<br />
[/js]</p>
<p>In the preceding code we are using the $http.get() method of Angular. In the URL part we have given a sample web service URL of geo data. You can get these free web services here.</p>
<p>So in the success part we are returning the response of the web service. </p>
<p>Now if you write the response.geonames in the success in the browser console as follows, you will get the array as shown below.</p>
<p>console.log(response.geonames);  </p>
<p><div id="attachment_9941" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/03/Learning-AngularJS-http1.png"><img decoding="async" aria-describedby="caption-attachment-9941" src="http://sibeeshpassion.com/wp-content/uploads/2015/03/Learning-AngularJS-http1-1024x516.png" alt="Learning AngularJS http" width="634" height="319" class="size-large wp-image-9941" srcset="/wp-content/uploads/2015/03/Learning-AngularJS-http1.png 1024w, /wp-content/uploads/2015/03/Learning-AngularJS-http1-300x151.png 300w, /wp-content/uploads/2015/03/Learning-AngularJS-http1-768x387.png 768w, /wp-content/uploads/2015/03/Learning-AngularJS-http1-400x202.png 400w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-9941" class="wp-caption-text">Learning AngularJS http</p></div><br />
Once it is returned we are showing the response data to the UI using the repeat directive.</p>
<p>So that is all.</p>
<p><strong>Output</strong></p>
<div id="attachment_9951" style="width: 449px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/03/Learning-AngularJS-http2.png"><img decoding="async" aria-describedby="caption-attachment-9951" src="http://sibeeshpassion.com/wp-content/uploads/2015/03/Learning-AngularJS-http2.png" alt="Learning AngularJS http" width="439" height="261" class="size-full wp-image-9951" srcset="/wp-content/uploads/2015/03/Learning-AngularJS-http2.png 439w, /wp-content/uploads/2015/03/Learning-AngularJS-http2-300x178.png 300w, /wp-content/uploads/2015/03/Learning-AngularJS-http2-400x238.png 400w" sizes="(max-width: 439px) 100vw, 439px" /></a><p id="caption-attachment-9951" class="wp-caption-text">Learning AngularJS http</p></div>
<p>Now apply the CSS</p>
<p>Add the following CSS to your page.<br />
[css]<br />
&lt; style &gt; li {<br />
    border: 1px solid#ccc;<br />
    border &#8211; right: none;<br />
    border &#8211; left: none;<br />
    padding: 2px;<br />
    text &#8211; align: center;<br />
    list &#8211; style: none;<br />
} &lt; /style&gt;<br />
[/css]</p>
<p>Once you add the CSS you will get output as follows.</p>
<div id="attachment_9961" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/03/Learning-AngularJS-http3.png"><img decoding="async" aria-describedby="caption-attachment-9961" src="http://sibeeshpassion.com/wp-content/uploads/2015/03/Learning-AngularJS-http3-1024x229.png" alt="Learning AngularJS http" width="634" height="142" class="size-large wp-image-9961" srcset="/wp-content/uploads/2015/03/Learning-AngularJS-http3.png 1024w, /wp-content/uploads/2015/03/Learning-AngularJS-http3-300x67.png 300w, /wp-content/uploads/2015/03/Learning-AngularJS-http3-768x172.png 768w, /wp-content/uploads/2015/03/Learning-AngularJS-http3-400x89.png 400w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-9961" class="wp-caption-text">Learning AngularJS http</p></div>
<p>Cool. We did it.</p>
<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 $http &#8211; sibeeshpassion &lt;/title&gt;<br />
        &lt;style&gt;<br />
         li {<br />
            border: 1px solid #ccc;<br />
            border-right: none;<br />
            border-left: none;<br />
            padding: 2px;<br />
            text-align: center;<br />
            list-style:none;<br />
          }<br />
         &lt;/style&gt;<br />
        &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js&quot;&gt;&lt;/script&gt;<br />
    &lt;/head&gt;<br />
    &lt;body&gt;<br />
        &lt;div ng-app=&quot;httpApp&quot; ng-controller=&quot;httpController&quot;&gt;<br />
            &lt;ul&gt;<br />
                &lt;li ng-repeat=&quot;det in details&quot;&gt;{{ det.name + &#8216;, &#8216; + det.countrycode }} &lt;/li&gt;<br />
            &lt;/ul&gt;<br />
        &lt;/div&gt;<br />
        &lt;script&gt;<br />
            var app = angular.module(&#8216;httpApp&#8217;, []);<br />
            app.controller(&#8216;httpController&#8217;, function ($scope, $http) {<br />
            $http.get(&quot;http://api.geonames.org/citiesJSON?north=44.1&amp;south=-9.9&amp;east=-22.4&amp;west=55.2&amp;lang=de&amp;username=sibeeshvenu&quot;)<br />
            .success(function (response) {<br />
               $scope.details = response.geonames;<br />
               console.log(response.geonames);<br />
               });<br />
         });<br />
         &lt;/script&gt;<br />
    &lt;/body&gt;<br />
&lt;/html&gt;<br />
[/html]</p>
<p><strong>Conclusion</strong></p>
<p>Now that is all for the day, 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-http/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
