简体   繁体   English

离线打包的Chrome应用中的Derby.js吗?

[英]Derby.js in an off-line packaged Chrome App?

I've been working with AngularJS in an off-line packaged Chrome App . 我一直在离线打包的Chrome应用程序中使用AngularJS。

I came across off-line sync requirements that points to ShareJS and RacerJS. 我遇到了脱机同步要求,这些要求指向ShareJS和RacerJS。

Is it possible to use Derby.js in an off-line packaged Chrome App? 是否可以在离线打包的Chrome应用中使用Derby.js?

AngularJS example App . AngularJS示例应用程序

Possible CSP issue . 可能的CSP问题

Thanks! 谢谢!

Mike 麦克风

It is possible using the derby-standalone module. 可以使用derby-standalone模块。

You can see an example of client-side only Derby in CodePen and another example which uses derby for only part of the content of a site . 您可以在CodePen中看到仅客户端Derby的示例,以及仅对站点内容的一部分使用derby的另一个示例。

With derby standalone you can put a few lines of code to initialize a client-side app and render templates/components in the browser: 使用独立的derby,您可以放置​​几行代码来初始化客户端应用程序并在浏览器中呈现模板/组件:

var app = derby.createApp();
app.registerViews();
var page = app.createPage();
document.body.appendChild(page.getFragment('body'));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM