Posts by Saymon Souza • 26 points
3 posts
-
0
votes3
answers331
viewsA: Angular - Search for equal values in two objects
Now they’re clearing things up, thank you very much. Stayed like this: var obj1 = $rootScope.objecto1; var obj2 = objeto2; for (var key in obj1) { if (obj1.id === obj2.id){ $scope.Nome = obj1.nome;…
-
1
votes1
answer54
viewsA: Zerar Specific field in the Form
First of all, there’s only one small problem in <option value="0">zerar</option>, who is with the same value of default. For the code I added below, I took into account that this option…
-
0
votes3
answers331
viewsA: Angular - Search for equal values in two objects
One way to solve this is to loop one of the objects and compare the attributes: var obj1 = { id: 2, name: 'teste' }; var obj2 = { id: 2 }; for (var key in obj1) { if (obj1.id === obj2.id)…