指令通信的指令不断抛出错误

时间:2017-07-12 07:41:58

标签: angularjs directive

angular.module("baseApp", [])
directive("theNav", [function(){
        return{
            restrict: "A",
            scope: {},
            controller: function($scope){
                $scope.showMe = {
                    isNavDisplayed: true
                }
            }   
        }
    }])
    .directive("toggleNav", [function(){
        return{
            require: "^theNav",
            restrict: "A",
            link: function(scope, elem, attrs){ 
            }
        }
    }])

0 个答案:

没有答案