AngularJS directive is not working

后端 未结 1 560
梦谈多话
梦谈多话 2021-02-15 23:49

Please find below the directive which i wrote,

angular.module(\'netVogue.directives\', []).
  directive(\'set-First-Active\', function() {
      return function(         


        
相关标签:
1条回答
  • 2021-02-15 23:53

    When declaring directive should has camel case name (setFirstActive).

    See developer guide on directives.

    Directives have camel cased names such as 'ngBind'. The directive can be invoked by translating the camel case name into snake case with these special characters :, -, or _. Optionally the directive can be prefixed with x-, or data- to make it HTML validator compliant. Here is a list of some of the possible directive names: ng:bind, ng-bind, ng_bind, x-ng-bind and data-ng-bind.

    0 讨论(0)
提交回复
热议问题