ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Types of Expressions with Example in AngularJS<p>Hi <a class="username" rel="rani"> rani</a>,</p> <p>The expression is something which we write to perform or achieve some task like Addition of two numbers, string concatenation, etc.</p> <p>Below are the types of Expressions in AngularJS.</p> <ol style="list-style-type: undefined;"> <li>Number Expressions</li> <li>String Expressions</li> <li>Object Expressions</li> <li>Array Expressions</li> </ol> <p><span style="text-decoration: underline;">Number Expressions</span></p> <p>If any expression is using the number and the operators like +, -, *, % etc. those expressions is called as number expressions.</p> <p><span style="text-decoration: underline;">String Expressions</span></p> <p>The string expression is used perform operations on string values.</p> <p><span style="text-decoration: underline;">Object Expressions</span></p> <p>The object expressions used to hold object properties and evaluates when displaying.</p> <p><span style="text-decoration: underline;"> Array Expressions</span></p> <p>The array expressions are used to hold an array of object values.</p> <p><strong><span style="text-decoration: underline;">Example</span></strong></p> <div class="demo_block"> <pre class="brush: html">&lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&gt; &lt;head&gt; &lt;title&gt;Types of Expressions in AngularJS&lt;/title&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.8/angular.min.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34;&gt; var app = angular.module(&#39;MyApp&#39;, []) app.controller(&#34;MyController&#34;, function ($scope) { $scope.Number1 = 50; $scope.Number2 = 60; $scope.String1 = &#34;Welcome to&#34;; $scope.String2 = &#34;aspsnippets.com&#34;; $scope.String3 = &#34;aspforums.net&#34;; $scope.Customer = { Name: &#39;Mudassar Khan&#39;, City: &#39;Mumbai&#39;, Country: &#39;India&#39; }; $scope.Result = [[&#39;English&#39;, &#39;Mathmatics&#39;, &#39;Physics&#39;, &#39;Chemistry&#39;], [80, 99, 85, 83]]; }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div ng-app=&#34;MyApp&#34; ng-controller=&#34;MyController&#34;&gt; &lt;h3&gt;&lt;u&gt;Number Expression&lt;/u&gt;&lt;/h3&gt; &lt;span&gt;Sum of Number1 and Number2 is : &lt;/span&gt;&lt;b&gt;{{Number1 + Number2}}&lt;/b&gt;&lt;br /&gt; &lt;span&gt;Multiplication of Number1 and Number2 is : &lt;/span&gt;&lt;b&gt;{{Number1 * Number2}}&lt;/b&gt; &lt;h3&gt;&lt;u&gt;String Expression&lt;/u&gt;&lt;/h3&gt; {{String1+&#34; &#34;+String2}}&lt;br /&gt; {{String1}} {{String3}} &lt;h3&gt;&lt;u&gt;Object Expression&lt;/u&gt;&lt;/h3&gt; &lt;span&gt;Name : &lt;/span&gt;&lt;b&gt;{{Customer.Name}}&lt;/b&gt;&lt;br /&gt; &lt;span&gt;City : &lt;/span&gt;&lt;b&gt;{{Customer.City}}&lt;/b&gt;&lt;br /&gt; &lt;span&gt;Country : &lt;/span&gt;&lt;b&gt;{{Customer.Country}}&lt;/b&gt; &lt;h3&gt;&lt;u&gt;Array Expression&lt;/u&gt;&lt;/h3&gt; &lt;span&gt;{{Result[0][0]}} : &lt;/span&gt;&lt;b&gt;{{Result[1][0]}}&lt;/b&gt;&lt;br /&gt; &lt;span&gt;{{Result[0][1]}} : &lt;/span&gt;&lt;b&gt;{{Result[1][1]}}&lt;/b&gt;&lt;br /&gt; &lt;span&gt;{{Result[0][2]}} : &lt;/span&gt;&lt;b&gt;{{Result[1][2]}}&lt;/b&gt;&lt;br /&gt; &lt;span&gt;{{Result[0][3]}} : &lt;/span&gt;&lt;b&gt;{{Result[1][3]}}&lt;/b&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;</pre> </div> <p><a class="demo button orange btn btn-red">Demo</a></p>https://www.aspforums.net:443/Threads/181137/Types-of-Expressions-with-Example-in-AngularJS/https://www.aspforums.net:443/Threads/181137/Types-of-Expressions-with-Example-in-AngularJS/Wed, 07 Aug 2019 04:34:19 GMT