Javascript 如何利用Yeoman、AngularJS数据和Node.js将数据上传到Heroku starter数据库?

Javascript 如何利用Yeoman、AngularJS数据和Node.js将数据上传到Heroku starter数据库?,javascript,node.js,angularjs,heroku,yeoman,Javascript,Node.js,Angularjs,Heroku,Yeoman,我的应用程序正在使用Yeoman,AngularJS。我对它相当陌生,所以这个问题是关于管理数据的。目前,我正在将数据硬编码到main.js文件中的JSON对象数组中 angular.module('myApp') .controller('AdminCtrl', ['$scope', '$filter', function($scope, $filter) { //<--ARRAY OF DATA with multiple attributes<-- $scope

我的应用程序正在使用Yeoman,AngularJS。我对它相当陌生,所以这个问题是关于管理数据的。目前,我正在将数据硬编码到main.js文件中的JSON对象数组中

angular.module('myApp')
.controller('AdminCtrl', ['$scope', '$filter', function($scope, $filter) {
    //<--ARRAY OF DATA with multiple attributes<--
    $scope.campaigns = [
    { name:'', description'', etc... etc...},
    {...Lots of Data...},
    {...Lots of Data...},
    {...Lots of Data...},
    {...Lots of Data...},
    ];
}]);
angular.module('myApp')
.controller('AdminCtrl',['$scope','$filter',函数($scope,$filter){
// 为什么不在你现有的应用程序上运行该应用程序呢?这将使你朝着成功部署迈出一大步

无论哪种方式,都有很好的文档记录:


感谢您提供的资源。我遵循了将Yeoman/Angular应用程序部署到Heroku和将Yeoman+Angular应用程序部署到Heroku链接(看起来基本相同)的步骤,并进行了“grunt构建”但是当我刷新页面时,数据仍然丢失。我认为这是因为他们正在部署一个静态angular应用程序,而没有动态数据更新。我如何获取当前阵列数据并利用“web.js”使其持久化?