为什么我们不能通过Nativescript Angular应用将angular-fire2软件包用于Firebase [英] Why can't we use angular-fire2 package for firebase with Nativescript Angular app
问题描述
如果nativescript在后台使用javascript引擎.如果我使用angular进行本机脚本开发,那么我是否应该不能将angular-fire2用于firebase.
If nativescript is using javascript engine behind the scene. If I use angular for nativescript development, shouldn't I be able to use angular-fire2 for firebase.
如果可以共享代码,Web和Mob App会更好.
if I could code sharing would be much better with Web and Mob App.
推荐答案
https://stackoverflow.com/a/46088932/6408287包含您要寻找的答案.简而言之-NativeScript没有实现node.js模块规范.
https://stackoverflow.com/a/46088932/6408287 contains the answer you are looking for. In short - NativeScript does not implement the node.js modules specification.
Angular-fire2可以在node.js内运行,而移动firebase sdks可以在移动平台上运行.有效率的.因此,API有所不同.
Angular-fire2 is made to run inside node.js, whereas mobile firebase sdks are made to run on mobile platforms. Efficiently. Hence the difference in APIs.
即使您要以某种方式在NativeScript上运行angular-fire2,也有可能执行效果不如移动sdks.
Even if you were to somehow run angular-fire2 on NativeScript, chances are it wouldn't execute as well as the mobile sdks would.
这篇关于为什么我们不能通过Nativescript Angular应用将angular-fire2软件包用于Firebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!