Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs StrongLoop环回系统_Angularjs_Gruntjs_Yeoman_Loopbackjs_Strongloop - Fatal编程技术网

Angularjs StrongLoop环回系统

Angularjs StrongLoop环回系统,angularjs,gruntjs,yeoman,loopbackjs,strongloop,Angularjs,Gruntjs,Yeoman,Loopbackjs,Strongloop,我试图将StrongLoop Loopback[后端]与Yeoman工作流[前端]集成在一起,但很难将这两个代码库统一起来。我知道我可以使用StrongLoop的环回独立开发我的“后端”,并将其作为RESTAPI公开。然而,我宁愿使用环回Angular SDK进行开发,并在同一个应用程序中以编程方式连接到模型。我想知道我需要如何组织我的文件夹结构,更新我的Gruntfile.js以包括服务和构建功能的环回应用程序设置,并且只运行一个服务器实例进行开发(而不是我的yeoman应用程序前端的“gru

我试图将StrongLoop Loopback[后端]与Yeoman工作流[前端]集成在一起,但很难将这两个代码库统一起来。我知道我可以使用StrongLoop的环回独立开发我的“后端”,并将其作为RESTAPI公开。然而,我宁愿使用环回Angular SDK进行开发,并在同一个应用程序中以编程方式连接到模型。我想知道我需要如何组织我的文件夹结构,更新我的Gruntfile.js以包括服务和构建功能的环回应用程序设置,并且只运行一个服务器实例进行开发(而不是我的yeoman应用程序前端的“grunt service”和环回后端的“slc run”)

我读过关于yeoman脚手架的“计划”,与环回的CLI工作流不同,但它们在Github上的使用时间超过5个月,没有任何更新

如果您能提供任何指导,使其立即生效(而不是等待此功能的开发),我们将不胜感激

供参考: 下面是详细介绍的带有Grunt命令的环回SDK指令

有一个与RESTful服务器端交互的本机

您还可以使用自定义构建服务将环回API和角度前端结合起来:

angular.module('catalog', [])
    .constant('ENDPOINT_URI', 'http://0.0.0.0:3000/api/')
    .controller('CatalogController', function (ProductsModel) {
        var store = this;
        function getItems() {
            ProductsModel.all()
                .then(function (result) {
                    store.products = result.data;
                });
        }
        store.products = [];
        getItems();
    })
    .service('ProductsModel', function ($http, ENDPOINT_URI) {
        var service = this,
            path = 'products/';
        function getUrl() {
            return ENDPOINT_URI + path;
        }
        service.all = function () {
            return $http.get(getUrl());
        };
    });

我不确定为什么这被标记为正确答案,特别是考虑到约翰尼姆的以下评论。