Skip to content
This repository was archived by the owner on Dec 30, 2018. It is now read-only.
This repository was archived by the owner on Dec 30, 2018. It is now read-only.

[BUG] 全局loading有可能无法消失的问题. #64

Description

@zackyang000

https://github.com/zensh/jsgen/blob/master/static/src/js/app.js#L31-L54

在这段代码里面使用了transformRequest和transformResponse来处理全局loading的问题, 这是一个好想法. 这个很像Jquery AjaxStart和AjaxStop. 不过在Angular里面, 这两个方法并不代表发起和结束ajax.

这里我只测试了transformResponse的情况, 如果返回的响应是没有内容或者报错, 将无法触发这个callback. 你可以尝试让服务端返回一个 204 或 500, 将重现这个问题.

这里 似乎提供了更好的解决方案.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions