Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Online AngularJS Editor

<html>
   <head>
      <title>Angular JS Filters</title>
      <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js">
      </script>
   </head>
   
   <body>
      <h2>AngularJS Sample Application</h2>
      
      <div ng-app = "new" ng-controller = "studentctrl">
         <table border = "0">
             
<tr>
    <td> Enter the First Name :</td>
    <td><input type="text" ng-model="student.firstname"</td>
    
</tr>
<tr>
    <td>Enter the Second Name :</td>
    <td><input type="text" ng-model="student.secondname"</td>
</tr>
<tr>
    <td>Enter Fees :</td>
    <td><input type="text" ng-model="student.fee"</td>
</tr>
<tr>
    <td>Enter Subject :</td>
    <td><input type="text" ng-model="subject"</td>
</tr>
</table>
<br/>
<table border="1">
<tr>
    <td>Uppercase:</td><td>{{student.FullName() | uppercase</td>
</tr>
<tr>
    <td>Lowercase:</td><td>{{student.FullName() | lowercase</td>
</tr>
</table>
</div>
<script>
    var neww=angular.module("new",[]);
    neww.controller('studentctrl',function($scope)
    {
        $scope.student={
            firstname: "ranjith",
            secondname: "kumar",
            fee="100",
            
        subject:[
            {name:'maths', mark:60}
            {name:'phy', mark:70}
            {name:'chm',mark:80}],
            
            
        FullName:function()
        {
            var stnd ;
            stnd= $scope.student;
            return stnd.firstname+""+stnd.secondname;
        }
        };
    });
</script>

            
      
   </body>
</html>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.