angularjs - Javascript String array with ng-repeat -


i have js array of strings:

for(var =0; i<db.length; i++)     console.log(db[i]); 

and output:

dbname:rf,dbstatus:true dbname:rt,dbstatus:false 

and want loop on ng-repeat:

$scope.dbarray = db; 

in html:

<ul>     <li ng-repeat = "line in dbarray">       {{line.dbname}} - line.dbstatus     </li> </ul> 

the loop not work now. ideas?

you missing curly braces on second line.dbstatus output of js array doesn't json or array me.

dbname:rf,dbstatus:true dbname:rt,dbstatus:false 

should more

[{     dbname:rf,dbstatus:true  },  {     dbname:rt,dbstatus:false }] 

that on problem, ng-repeat not work.

have @ plunker


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -