Home javascript NG-MODEL in Nested NG-REPEAT (Angularjs)

NG-MODEL in Nested NG-REPEAT (Angularjs)

Author

Date

Category

Case Applies Angular .

In general, let me give me a code:

& lt; div ng-repeat = "author in authors" & gt;
 & lt; Div NG-REPEAT = "Book in Author.Books" & gt;
  & lt; ng-form name = "book_form" & gt;
   & lt; input name = "year" type = "text" ng-model = "??" & gt;
  & lt; / ng-form & gt;
 & lt; / div & gt;
& lt; / div & gt;

Authors Lies in the SCOPE of the controller and each “author” has a lot of books.

  • How to get an input value from the controller?
  • How to make ng-model work with multidimensional lists?

Answer 1

For example, this is ng-model = “book.name” http://jsfiddle.net/ RUBAXa / TPDZM /

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions