为什么这个控制器中的 console.log 和功能不起作用?

Why is the console.log and functions inside this controller not working?

console.log 语句没有记录任何内容,我的控制器函数中的其余代码也没有:

var app = angular.module('myApp.manage.alertDirectives', [])
.directive('alert-bar', function () {

    return {
        template: 
            '<section ng-show="showAlert" ' +
            'ng-click="closeNotification()" ' +
            'class="ng-notification"> ' +
            '<p class="alert-msg">{{alert_message}}</p> ' +
            '<div class="alert-bg {{alert_type}}"></div> ' +
            '</section>',
        restrict: 'E',
        controller: function($scope,
                             ScopeFactory) {

            console.log('inside controller for alerts Directive:');
            var vs = $scope;
            ScopeFactory.saveScope('alerts', vs);
        }
    };
});

但是在我的其他指令的控制器中,那里的代码正在运行!

var app = angular.module('myApp.manage.termsDirectives', 
['myApp.manage.alertDirectives'])

.directive('termsForm', function() {
    return {
        templateUrl: "manage/terms/termsForm.html",
        restrict: "E",
        controller: function($scope,
                             $location,
                             ApiFactory,
                             TermsFactory,
                             TermsStringFactory,
                             ScopeFactory) {

            console.log('inside controller for termsForm Directive:');

<alert-bar></alert-bar> 在我的页面顶部,<terms-form></terms-form> 在另一个控制器内部:

<div class="container" ng-view></div> 包含以下内容:

<div class="col-sm-12 terms-container" ng-controller="TermsCtrl as tc">
    <div class="row" id="term-form-block">
        <terms-form></terms-form>

<alert-bar> 的指令规范化名称应该是驼峰式的:

.directive("alertBar", function(){...})

注册指令时 - 就像 "termsForm".