如何使用Angular2初始化Parse并指向serverURL [英] How to initialize Parse and point to serverURL using Angular2

查看:58
本文介绍了如何使用Angular2初始化Parse并指向serverURL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Parse服务器,目前我遇到了在javascript中初始化Parse并指向正确的serverURL的问题。好奇,如果有人有任何运气使用Angular2吗?

I am attempting to use a Parse server and am currently running into issues with initializing Parse in javascript and pointing to the correct serverURL. Curious if anyone else has had any luck doing this with Angular2 yet?

推荐答案

我在Angular 1应用程序中使用Parse服务器,但代码适用于两者。我正在自己的Parse服务中初始化Parse,它提供了一些方便的帮助方法。但是我认为你运行这段代码并不重要。

I'm using Parse server within an Angular 1 application, but the code works for both. I'm initializing Parse in a own Parse service, which provides some handy helper methods. But I think it doesn't matter where you run this code.

var appId = 'appId';
var jsKey = 'jsKey'; // I think this is not used anymore
Parse.initialize(appId, jsKey);
Parse.serverURL = 'yourNewServerUrl.com';

这篇关于如何使用Angular2初始化Parse并指向serverURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆