gpt4 book ai didi

angularjs - Angular API 对象

转载 作者:行者123 更新时间:2023-12-01 23:31:08 24 4
gpt4 key购买 nike

我正在创建一个从下面抓取数据的链接

enter image description here

<a href="#">{{ product.category.value }}</a>

这很好用,但在从数据对象中获取 slug 时遇到问题。

enter image description here

如何获得子弹?

<a ui-sref="{{ product.category.data.109923...slug }}">{{ product.category.value }}</a>

请记住 109923 对象会在不同的页面上发生变化,因此不能硬编码。希望有人能提供帮助

最佳答案

使用 $watch 观察你的可变对象 喜欢:

$scope.$watch('data', function (watch) {
// watch your object here
})

也许这对你有帮助

你可以为你的数据使用ng-repeat,比如:

<div ng-repeat="d in data" >
<a ui-sref="">{{ product.category.d.109923...slug }}</a>
</div>

关于angularjs - Angular API 对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35535144/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com