Closed time-wcrp closed 9 years ago
@iitum ไม่จำเป็นต้องเขียนเป็น directive
ถ้าไม่ใช่ reusable component
ถ้า reuse code ด้วยวิธีอื่นๆได้ เช่น include
ก็ไม่จำเป็นต้องเสียเวลาเขียน directive.
เมื่อออกแบบ directive เราจะมองเป็น class
ชนิดหนึ่ง (class คือการ reuse code ประเภทหนึ่ง) หลักการใหญ่ๆ ของการสร้าง class/directive คือ
@liverbool โอเคครับ เดี๋ยวเอาออกจาก directive มาใช้การ include แทน
@intbizth/ionicer