This code snippet is a reply to one of questions asked via an energetic email.
AngularJs is a robust framework, which provides great feature to develop web applications. Sometime we need to add / show static contents on our webpage/webapp. AngularJS provides a simple way to do the same:
- <tr>
- <td height="26">Current Release ver.:</td>
- <td>1.3.1 (as of dt. {{"Nov 07, 2014"}})</td>
- </tr>
In above curly braces will display the things as it is i.e. :
Nov 07, 2014
Following is the complete snippet defining a table with static contents:
- <body ng-app>
- <div>
- <h1>Here is a simple html table as on {{"November 07, 2014"}}</h1>
- <table>
- <caption><b>Importants of Angular JS</b></caption>
- <tbody>
- <tr>
- <td height="26">Official Name:</td>
- <td>AngularJS</td>
- </tr>
- <tr>
- <td height="26">Written or maintained by:</td>
- <td><a href="href=http://www.google.co.in/about/company/" title="Google Inc." target="_blank">Google Inc.</a></td>
- </tr>
- <tr>
- <td height="26">Released on:</td>
- <td>2009</td>
- </tr>
- <tr>
- <td height="26">Current Release ver.:</td>
- <td>1.3.1 (as of dt. {{"Nov 07, 2014"}})</td>
- </tr>
- <tr>
- <td height="26">Develop using:</td>
- <td>Javascript</td>
- </tr>
- <tr>
- <td height="26">Type:</td>
- <td>Client side/cross-platform</td>
- </tr>
- <tr>
- <td height="26">Links</td>
- <td width="676">
- <a href="http://angularjs.org">angularJS</a>
- <a href="http://doc.angularjs.org">documentation</a>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-
- <div>
- <table>
- <caption><b>Can do using angularJS</b></caption>
- <tbody>
- <tr>
- <td height="26">Sum</td>
- <td>1 + 9 = {{1+9}}</td>
- </tr>
- <tr>
- <td height="26">Minus</td>
- <td>1 - 9 = {{1-9}}</td>
- </tr>
- <tr>
- <td height="26">Multiply</td>
- <td>1 X 9 = {{1*9}}</td>
- </tr>
- <tr>
- <td height="26">Divide</td>
- <td>1 / 9 = {{1/9}}</td>
- </tr>
- </tbody>
- <p>and these are only few examples see source code of above and you can see the magic of { { } } curly braces</p>
- </table>
- </div>
- <script src="Scripts/angular.min.js"></script>
- </body>
Please note that - we can achieve the same thing using simple HTML. Here we saw one of the great feature of AngularJS