just use ng-repeat
to render your inputs. comon man you can put some effort in this
Somethings wrong with the code man, Is there other ideas other than using ng-repeat
? because I already have this code on my factory, did you remove this code ?
return {
getQuestion: function(id) {
if(id < questions.length) {
return questions[id];
} else {
return false;
}
},
questions : questions
];
and change it into this ?
return {
getQuestion: function() {
return questions
}
};
I’m having a problem in declaring this getquestion in my controller
I tried this but it’s not working
I strongly advice you to learn basic AngularJS
@yurinondual Thanks for the time and the help for helping me., You are now at the closest part to solve my problem , Can you help me solve this please, Yes, I’m trying to learn AngularJS , I know a little bit and I’m still exploring angularjs.
As you can see this image has submit and next question button ,
everytime the user press the submit button a popup message will appear either wrong or correct ,
and you will proceed to the next question.
When you proceed to the next question the index of this array will increment.
Now , my little problem in your code you gave me is that you used ng-repeat
instead of using array[index]
,
Just this example , this represents each array[index]
and it’s maxlength
<input type='text' ng-value={{questions[1].maxCharLength()}}>
All I want to happen is to get the array[index] of each pattern , just like this but this isn’t working .
<input production-qty="{{questions[1].pattern}}" type="text" maxlength="20" ng-model="qty1">
PLease help
I tried ng-pattern-restrict but it not works in ionic but it works in angual js web excluding in ionic app.