[英]What should I write in baseURL while deploying my app at heroku?
i have problem at angular.js side in 'services.js' or say 'factory.js'. 我在'services.js'的angular.js方面遇到问题或者说'factory.js'。
I am not able to understand what should i write in replace of 'HERE' in baseURL when deplooying app at heroku: 我无法理解在heroku中使用deplooying app时应该在baseURL中替换'HERE'时应该写什么:
angular.module('confusionApp')
.constant("baseURL", "__HERE__")
When i leave it empty, i am able to register, but not login. 当我把它留空时,我可以注册,但不能登录。
I am using this when running my app locally: 我在本地运行我的应用程序时使用此功能:
angular.module('confusionApp')
.constant("baseURL", "http://localhost:3000/")
I am able to connect my database with mlab. 我能够用mlab连接我的数据库。
Everything goes well, except, when i tried to login in my app,i got error undefined in replace of $state.go(). 一切顺利,除非,当我尝试登录我的应用程序时,我在更换$ state.go()时得到错误未定义。
Here is the link to my app, kindly check it yourself: 这是我的应用程序的链接,请亲自检查:
http://idiscover.herokuapp.com/ http://idiscover.herokuapp.com/
This code worked: 这段代码有效:
angular.module('confusionApp')
.constant("baseURL", "")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.