0

I write my application with HTML, JS and Angular.js.

Here is the relvant HTML part:

 <div class="col-md-4 col-md-offset-0" ng-repeat="app in apparray track by $index">
     // some HTML code
<input type="text" class="form-control" ng-model="typex" style="width: 66%" id="inputEmail3" required="" value=app[0] placeholder=app[0] disabled>
  // More HTML code
 </div>

Here is the JS file:

wdConfControllers.controller('MController',
    function($scope, $modal, $location, WdConfClient) {
  //some code
   $scope.apparray = []
   $scope.init = function () {
       for(var i = 0; i < 3; i++) {
               $scope.apparray.push(["appt", "", "", "", ""]);
    }
 }

I want that my input would prints the value of the first argument in the specific app. In our case is appt. But it prints app[0].

How I get to the first argument in app[0]

2 Answers 2

1

You need to evaluate non angular attributes yourself by {{}}:

value="{{app[0]}}" placeholder="{{app[0]}}"

Sign up to request clarification or add additional context in comments.

Comments

0

If you are looking to tie the input to a particular value, that is what ngmodel is for, which you have tied to typex

<input type="text" class="form-control" ng-model="app[0]" style="width: 66%" id="inputEmail3" required="" disabled>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.