angular.js - directive命名规则?
phpcn_u1582
phpcn_u1582 2017-05-15 16:52:18
0
1
668

directive只能由小写字母组成吗?

.directive('名称', function() { return { restrict: 'AE', template: '

Hi there

', replace: true }; });

例如,
hello ok
helloA not work
Hello not work
hello_a not work
hello-a not work

我的要一个词组命名怎么办?

phpcn_u1582
phpcn_u1582

reply all (1)
迷茫

UsingCamelCasenaming
Such as: hello A not work
Named: helloANotWork

Detailed rules:
Use the following method in html

html

But this is required when defining instructions

javascriptmyApp.directive("myNewDirective", function(){...});
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!