1
My scripts:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0/angular.min.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/2.2.0/angularfire.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.6.6/firebase.js"></script>
Hello I am beginner with firebase and angular, I have the following situation in my bank:
obs. manually entered values.
Now I would like to leave dynamic with angular, and I am doing this way the controller:
app.controller("CtrlList", function($scope, $firebaseArray){
var ref = firebase.database().ref().child("users");
$scope.addUser = function(){
$scope.users.$add({
text: $scope.newUserText
});
};
And my fluffy like that:
<form ng-submit="addUser()">
<input ng-model="newUserText" />
<button type="submit">Add User</button>
</form>
Being a beginner I’m a little lost and can not save in firebase, I believe I lack some concept.