javascript - 将 justgage-Angular 连接到编码的 json 数据?

标签 javascript json angularjs

我正在使用justgage-angular要显示我的仪表数据,我如何使用 angularjs 将 php 编码的 json 数据解析为我的仪表。

HTML

<just-gage id="test1" min=0 max=120 value=100 title="TPD"></just-gage>

我想解析编码的 JSON 数据,而不是具有静态数据的“值”。

最佳答案

将该值绑定(bind)到 $scope 变量:

在你的js中:

$scope.currentValue = 100;

HTML:

<just-gage id="test1" min=0 max=120 value="currentValue" title="TPD"></just-gage>

关于javascript - 将 justgage-Angular 连接到编码的 json 数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29279048/

相关文章:

javascript - 是否有用于强制方法签名的 Javascript 库?

javascript - jQuery FullCalendar 不呈现

javascript - 如何将 JSON 对象转换为 Javascript 数组?

javascript - 如何使用计时器关闭模态窗口

javascript - 一个 ng-model 中的多个指令

javascript - 如何将 javascript 文件设置为 :defaults in rails 4?

javascript - 如何使用 Javascript 从 URL 获取 JSON 字符串?

javascript - Webpack 捆绑许可证合规性?

c# - 无法将当前 JSON 数组(例如 [1,2,3])反序列化为“System.Collections.Generic.Dictionary”类型

javascript - 带有动态模板的指令