Angularjs Encapsulation Bootstrap Time plugin Datetimepicker_angularjs

Source: Internet
Author: User


background:Collaboration of angular with jquery class libraries



The third party class library, has to mention is the famous jquery, now basically is the domestic web development of the required tools. Its flexible DOM operations allow many web developers to stop. Coupled with the already mature jquery UI library and a large number of jquery plug-ins, is almost an inexhaustible treasure house. However, can it be combined with ANGULARJS?



Many angularjs fundamentalists have a negative attitude towards this. They believe that since the use of ANGULARJS as a Web application framework, it is necessary to avoid other classes of library interference, do pure MVVM mode application. Any DOM operation like jquery is unclean. All interface-related, such as DOM operations, are placed in directive, so that the page is directive without code, consistent with the JSF idea. MVVM,DSL, modular Thinking this is the trend of the web. Well, the idea is good, the fundamentalists are so pure. But the truth is, we can't live without jquery using Angularjs.



As we all know, Angularjs has a built-in jquery lite, and many of the methods in Angularjs source code are directly using the jquery method. For example, the Angularjs event binding mechanism. Since the prophets are using them, why don't we use them? The idea of component-based is not wrong, but there is no need to tie your hands and feet. The only thing to be aware of is not to use jquery's code to break the ANGULARJS structure. (Original link: Http://www.angularjs.cn/A0fG)






case: using the angular package Bootstrap official website Time plugin






Instructions for use:



Add on original Bootstrap-datetimepicker HTML fragmentng-model='timepickerTest' ng-time






Location of code on GitHub: Https://github.com/cynthiawupore/ui-bootstrap-datetimepicker



If you want to further study, you can click here to learn, and then attach 3 wonderful topics:



Bootstrap Learning Course



Bootstrap Practical Course



Bootstrap Plugin Usage Tutorial



The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.