简体   繁体   English

我想在有角度的js完成所有渲染之后运行jquery代码吗?

[英]I want to run jquery code after the angular js completed all its rendering?

I want to hide and show my div chart. 我想隐藏并显示我的div图表。 it should work with pages (Add, edit , saveas). 它应该适用于页面(添加,编辑,另存为)。 the toggling of div is done through checkbox when i checked on checkbox div show and when its unchecked div is hided. 当我在复选框div显示上选中并且隐藏其未选中的div时,通过复选框完成div的切换。 In addnew page i stored the value of checkbox ie(true/false). 在addnew页面中,我存储了复选框的值,即(true / false)。 when user go to edit page if checkbox value is true it should show divchart and vice and versa for false value. 如果复选框值为true,则当用户进入编辑页面时,对于false值,应该显示divchart,反之亦然。

Why not use ngShow? 为什么不使用ngShow? https://docs.angularjs.org/api/ng/directive/ngShow https://docs.angularjs.org/api/ng/directive/ngShow

I think it's better to avoid mixing jquery into AngularJS code if possible. 我认为最好避免将jquery混入AngularJS代码中。

For the future, you should format the code to make it more readable. 为了将来,您应该格式化代码以使其更具可读性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM