Angular JS: Detect if ng-bind-html finished loading then highlight code syntax

后端 未结 3 2019
陌清茗
陌清茗 2021-01-13 11:00

I am using ng-bind-html for binding data that I get from database.

app.controller(\'customersC
3条回答
  •  长情又很酷
    2021-01-13 11:42

    as you know the statements execute asynchronously, if there is no timeout $('pre code') will be empty as the DOM is still not rendered. use $timeout instead of setTimeout for the same.

提交回复
热议问题