I do understand why angular throws this error but i didn't find a solution that solves my case.
When angular encounter with ng-controller attribute, it tries to find injected controller named as the attribute value.
For example for my case: Angular tries to find StreamHelperController in the injected controller list, when it doesn not find it, it throws
"StreamHelperController is not a function"
.
Known Solution: Injecting controller before loading view layer.
Controller:
var app = angular.module('myapp');
app.controller('StreamHelperController', ['$scope', function ($scope) {}]);
View:
<div ng-controller="StreamHelperController ">
But the problem occurs when i load view before controller class. And this is my case. So how can i manage and solve this problem ?
ENV: Angularjs 1.5.8