Home > DeveloperSection > Forums > Adding Controls Dynamically in AngularJS
Ankit Singh

Total Post:341

Posted on    February-29-2016 10:00 PM

 Angular JS Angular JS 

 1 Reply(s)
 707  View(s)
Rate this:
we want to Adding Controls Dynamically  in AngularJS.how to use this please help me.

aditya kumar Patel

Total Post:254

Posted on    February-29-2016 10:08 PM


Layout = null;


<!DOCTYPE html>




<meta name="viewport" content="width=device-width" />

<script src="~/Scripts/jquery-1.9.1.js"></script>

<script src="~/Scripts/angular.js"></script>

<script type="text/javascript">

var ng = angular.module('myapp', []);

ng.controller('controller', function ($scope) {

$scope.rows = [];


FirstName: "Fist Name",

LastName: "Last Name",

IsActive: true


$scope.addRow = function () {


FirstName: "Fist Name",

LastName: "Last Name",

IsActive: true






<body ng-app="myapp">

<div ng-controller="controller" style="border:5px solid #E4E2E2;width:500px;">

<button ng-click="addRow()" style="color:red;font-size:18px;">Add New Row </button>

<div ng-repeat="row in rows">

<input type="text" placeholder="{{row.FirstName}}">

<input ng-class="{'blockInput': !row.IsActive}" placeholder="{{row.LastName}}" type="text">

<input type="checkbox" name="check" value="inline">IsActive






Don't want to miss updates? Please click the below button!

Follow MindStick