Attempting to create a factory and implement it in one of my controllers, I encountered an issue:
Issue: TypeError: wordsToTrain is not a function
Despite the simplicity of my controller and factory, I am still puzzled by the reason for this error:
angular.module('appleApp')
.controller('PracticeCtrl', [ '$scope', 'wordsToTrain', function ($scope, wordsToTrain) {
wordsToTrain();
}]);
angular.module('appleApp')
.factory('wordsToTrain', function () {
return 3;
});