in my app I'm trying I'm building a shopping cart. You can see the app in this codepen: http://codepen.io/summerfreeze/pen/VjqJYW. It's almost working, but I'm struggling with the last part. I want the "ADD ORDER LINE" button to add another order lines under the existing one. I'm trying to do this using jQuery:
myApp.directive('myDirective', function($scope) {
$scope.addline = function() {
$(".orderline").clone().appendTo('.main');
};
return addline();
});
But this doesn't seem to work. I would be grateful if someone would look at the code and tell me what mistake did I make.