angular
    .module('universal')
    .directive('start', function ($compile) {
        return {
            scope: {},
            templateUrl: 'Scripts/constructor/templates/start-template.html',
            controller: function ($scope, $element) {
                $scope.add = function () {
                    var el = $compile("<start></start>")($scope);
                    $element.parents('.row').find('#container .content').append(el);
                };
            }
        };
    })
    .directive('end', function ($compile) {
        return {
            scope: {},
            templateUrl: 'Scripts/constructor/templates/end-template.html',
            controller: function ($scope, $element) {
                $scope.add = function () {
                    var el = $compile("<end></end>")($scope);
                    $element.parents('.row').find('#container .content').append(el);
                };
            }
        };
    })
    .directive('rule', function ($compile) {
        return {
            scope: {},
            templateUrl: 'Scripts/constructor/templates/rule-template.html',
            controller: function ($scope, $element) {
                $scope.add = function () {
                    var el = $compile("<rule></rule>")($scope);
                    $element.parents('.row').find('#container .content').append(el);
                };
            }
        };
    });