I am trying to append the code on the left side of the click. My current controller code looks like this:
demo.$inject = ['$scope'];
demo.directive("boxCreator", function($compile){
return{
restrict: 'A',
link: function(scope , element){
element.bind("click", function(e) {
var childNode = $compile('<div ng-drop="true"> <span class="title">Drop area #2</span> <div ng-repeat="obj in droppedObjects2" ng-drag="true" ng-drag-data="obj" ng-drag-success="onDragSuccess2($data,$event)" ng-center-anchor="{{centerAnchor}}"> {{obj.name}}</div></div>')(scope)
element.parent().append(childNode);
});
}
}
});
I need help with how I can achieve appending on the left side of the click event.