Bài đăng

Đang hiển thị bài đăng từ Tháng 6, 2018

[AngularJS] pain point for new commer: camelCase directive & snake-case HTML markup

Hi all, I'm new with AngularJS in one project. The different of a directive in Javascript code & HTML markup has caused me lots of trouble. It took me one day of work just to found out the reason is the type of one HTML markup. The story: I used the library of the material table from  https://github.com/daniel-nagy/md-data-table#api-documentation Things are good. Only one thing not work is that pagination total number. I've checked everything correctly with the document in that link. After a long time investigating all the possible reason, I end up finding out that I'm using an HTML markup in camelCase  as mdTotal (which get from the documentation ), instead of writing it in s nake-case as md-total . I shall remember this forever when working with AngularJS, and so do you. ---V---