Angular Code Templates

JavaScript Module Template

(function (angular) {
    'use strict';
 
    angular
        .module('crEdit.EditModeModule', [])
        .controller('Controller', Controller)
        .service('Service', Service)
        .directive('crEditMode', crEditMode)
    ;
 
    Controller.$inject = ['dependencies'];
 
    function Controller(dependencies) {
        var vm = this;
 
        vm.exposedObject = {};
        vm.exposecFunction = exposedFunction;
    }
 
    function Service() {
        return {
            request: requestFunction,
            confirm: confirmFunction
        };
    }
 
    function crEditMode() {
        return {
            transclude: true,
            scope: {
                bindVar: '=',
                bindFcn: '&'
            },
            templateUrl: 'js/editMode/editMode.html'
        }
    }
 
}(window.angular));
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License