AngularJS directive not displaying the template

前端 未结 3 1224
生来不讨喜
生来不讨喜 2020-12-16 21:01

Here is my AngularJs directive. Its\' expected to show the div in the template but it shown nothing while the code is run.

Here is the html

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 21:35

    Angular normalizes directives names - using camelCase in the directive and dash seperated (usually) since html isn't case sensitive, in the template.

    so where you need to call the directive namedsuperMan with:

    
    

    Here is a working Demo

提交回复
热议问题