AngularJS angular-seed starter project adding directives

后端 未结 2 568
名媛妹妹
名媛妹妹 2021-01-27 08:27

I am trying to use the angular-seed project (https://github.com/angular/angular-seed) to start a new project. I am trying to add in a new directive.

Created testDirectiv

相关标签:
2条回答
  • 2021-01-27 08:56

    When including attribute directives inside the opening tag of an HTML element, they must be converted to dashes.

    <div test-directive>
    
    0 讨论(0)
  • 2021-01-27 09:15

    Whenever you wanted to use directive on the html, you should just replace capital letter to small case prefix - with it. Directive normalization process convert that test-directive to testDirective while compiling directive.

    <div test-directive></div>
    
    0 讨论(0)
提交回复
热议问题