-3
在WebStorm中,我可以在同一個項目中運行Angular和Node嗎?有沒有這樣的項目模板?發送數據從nodejs到angularjs
我想從路線的NodeJS發送陣列angularjs
謝謝!
這是我的代碼
conroller.js
$http({
method: 'GET',
url: '/Profil'
}).then(function (success){
console.log("i get the data");
$scope.items=success;
},function (error){
});
文件的NodeJS:
personne1={FirstName:"a", contry:"usa",LastName:"sfn"};
personne2={FirstName:"b", contry:"usa",LastName:"sfn"};
personne3={FirstName:"x", contry:"usa",LastName:"sfn"};
list=[personne1,personne2,personne3];
console.log("hello from profil");
res.render('Profil',{items:list});
是的,這是exaclty我正在使用,但我試圖從nodejs發送數據到angulars,但它不是'工作形式我這是我的代碼 – dal
請發佈您的代碼在問題中進行更深入的審查 – Brian