@Tej98 wrote:
Hello, I am new to the ionic creator and angular. I want to pass an input value ( in the textbox ) to a service in a file todos.js so that i can fire Firebase command accordingly.
I want a variable so that i can pass it instead of static text like in this ‘jaipur’
todos.js
angular.module(‘todos’, )
.service(‘Todos’, [’$FirebaseArray’,function($FirebaseArray){
var ref = firebase.database().ref().child(‘jaipur’);
var items = $FirebaseArray(ref);
var todos ={
‘items’: items
}return todos;
}]);
Posts: 1
Participants: 1