Why is the WizardPageSchoolclassCodesFactory factory not injected? Its always null!
The error in my chrome console is this:
Error: [$injector:unpr] Unknown provider: $scopeProvider <- $scope <- WizardPageSchoolclassCodesFactory
angular.module('myModule').controller('WizardMainController', function ($scope, WizardPageSchoolclassCodesFactory) {
// do stuff with data
});
'use strict';
angular.module('myModule').factory('WizardPageSchoolclassCodesFactory', function($scope) {
this.getData = function()
{
return "hello";
}
});
$scopefrom factory definition and create an API in the factory.