123

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <html>
  <head>
   <title>Angular first example</title>
   <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>
   <link rel="stylesheet" type="text/css" href="style.css">
 </head>

<body ng-app="mymodule">
  <div ng-controller="mycontroller">
    Rows of number: <input type="number" min="0" max="5" ng-model="rowLimit">
    </br>
  </br>
  <table>
     <thead>
       <tr>
         <td>Name</td>
         <td>Date Of Birth</td>
         <td>Salary(Number)</td>
         <td>Salary(Currency)</td>
       </tr>
     </thead>
     <tbody>
       <tr ng-repeat="employee in employees | limitTo: rowLimit ">
         <td>{{employee.name | uppercase}}</td>
         <td>{{employee.DateofBirth | date:dd/mm/yyyy }}</td>
         <td>{{employee.salary | number:2}}</td>
         <td>{{employee.salary | currency: $:1}}</td>
       </tr>
     </tbody>
  </table>
</div>
  <script src = "script.js"></script>
</body>
</html>

            
          
!
            
              table,tr,th,td{
  border:1px solid pink;
}
            
          
!
            
              var myapp = angular
                   .module("mymodule", [])
                   .controller("mycontroller", function($scope){
                     var employees = [
                       {name : "Leena", DateofBirth:new Date("March 08 1992"), salary:25000,},
                       {name : "Amit", DateofBirth:new Date("April 12 1990"), salary:55000,},
                       {name : "Kunal", DateofBirth:new Date("May 06 1982"), salary:65000,},
                       {name : "Ronak", DateofBirth:new Date("june 10 1997"), salary:75000,},
                       {name : "Namrata", DateofBirth:new Date("july 01 1962"), salary:85000,},
                       {name : "vivek", DateofBirth:new Date("Aug 18 1892"), salary:95000,},
                     ];
                     $scope.employees = employees;
$scope.rowLimit = 3;
                   });

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console