.

Angular Directive with Controller

View:

<div layout="column" layout-fill flex class="animate-slide-up" ng-controller="ShellController as vm">
    <h1>THIS IS SHELL</h1>
</div>

Directive:

(function() {
    'use strict';

    angular
        .module('app.layout')
        .directive('shell', shell);

        /* @ngInject */
        function shell () {
            var directive = {
                bindToController: true,
                controller: ShellController,
                controllerAs: 'vm',
                restrict: 'EA',
                scope: {
                    'navline': '='
                },
                templateUrl: 'app/layout/shell.html'
            };

            /* @ngInject */
            function ShellController() {
                var vm = this;
            }

            return directive;
        }
    })();

sd

What's your thoughts on this?

*

Protected by WP Anti Spam