As a newcomer to Angular and JS, I am struggling with incorporating an array stored in a variable inside a factory into my directive. The array, labeled as 'this.insights', needs to be imported.
I suspect that I may need to assign the array like so: scope.insights = [];
var Piece = function (parameters) {
this.thing = null;
this.that = null;
this.insights = [
{
id: 1,
},
{
id: 2,
}
];
}