Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/379.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.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
Javascript 如何通过node_模块或bower_组件将完整的angularjs web应用程序添加到另一个web应用程序项目中?_Javascript_Angularjs_Npm_Bower_Angular Templatecache - Fatal编程技术网

Javascript 如何通过node_模块或bower_组件将完整的angularjs web应用程序添加到另一个web应用程序项目中?

Javascript 如何通过node_模块或bower_组件将完整的angularjs web应用程序添加到另一个web应用程序项目中?,javascript,angularjs,npm,bower,angular-templatecache,Javascript,Angularjs,Npm,Bower,Angular Templatecache,我已经开发了一个完整的angularjs web应用程序,我需要Bower安装或npm将其安装到另一个angularjs项目中。我是否需要将整个应用程序捆绑为一个.js文件,例如templateCache.js,其中包含所有HTML代码,或者不需要将所有应用程序捆绑为一个.js文件,但单独使用index.css index.HTML index.js您的路径正确。您可以捆绑应用程序,然后将捆绑包包含在第二个应用程序中。您可以创建一个节点模块并通过package.json包含它,或者如果您使用的是

我已经开发了一个完整的angularjs web应用程序,我需要Bower安装或npm将其安装到另一个angularjs项目中。我是否需要将整个应用程序捆绑为一个.js文件,例如templateCache.js,其中包含所有HTML代码,或者不需要将所有应用程序捆绑为一个.js文件,但单独使用index.css index.HTML index.js

您的路径正确。您可以捆绑应用程序,然后将捆绑包包含在第二个应用程序中。您可以创建一个节点模块并通过package.json包含它,或者如果您使用的是git,则可以将git url放在bower.json文件中。当您运行第二个应用程序时,bower安装程序必须运行以获取其中包含的文件。使用angular template cache node_模块将应用程序html、css、js捆绑到一个.js中,或者您认为将捆绑包分离到.html.css.js中也会起作用。。。我目前正在Bower.json中提供git URL。Angular template cache通过将所有内容捆绑到一个文件中来工作。这和我现在做的很相似。