【问题标题】:cordova angularjs and console.log in xCodexCode中的cordova angularjs和console.log
【发布时间】:2014-11-06 11:21:01
【问题描述】:

这个让我有点发疯...... :)

我正在为 iOS 构建一个 Cordova 应用,使用 angularjs 作为应用逻辑。

现在,当应用收到设备就绪消息时,console.log 将从该点开始工作。 但我想在初始化过程中观察一些变量,例如在angular.module('..'[...]).config(function(...)){ [...]}); 中 - 但是这不起作用。如果我将console.log 放入 JS 的这些部分,我不会在 xCode 中得到任何 console.log 输出。

当我看不到日志消息时如何调试角度初始化过程?

【问题讨论】:

  • 不能直接在浏览器中运行调试吗?
  • 很遗憾,我需要运行一些仅在设备上可用的功能(推送)...

标签: javascript ios xcode angularjs cordova


【解决方案1】:

您可以在 deviceready 事件之后进行角度初始化。您可以调用 angular.bootstrap 来实现这一点。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-07-02
    • 2016-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-18
    相关资源
    最近更新 更多