I am encountering an issue with my AngularJS factory that consists of multiple functions.
My goal is to call one of the functions from within another function, as demonstrated in the code snippet below:
.factory("AppStart", function($cordovaSQLite) {
return {
init: function() {
var res = "hello";
console.log("in load start up page");
},
create_table: function() {
AppStart.init();
}
}
});
However, I am facing the error message:
AppStart is not defined.
How can I successfully call the init()
function within the create_table()
function? I have attempted directly calling init()
, but that approach did not yield any results either.