简体   繁体   English

mobile-angular-ui + laravel到phonegap

[英]mobile-angular-ui + laravel to phonegap

I programmed a backend in laravel + a frontend in mobile-angular-ui, and everythings works fine so far. 我在laravel中编写了一个后端,在mobile-angular-ui中编写了一个前端,到目前为止一切正常。

Now what I want to do is add the possibility of push notifications. 现在,我想做的就是添加推送通知的可能性。 To do that, I thought, I'll try phonegap to "convert" the whole thing into a native app, and then somehow wrap push-notifications around the whole thing. 我想,要做到这一点,我将尝试通过phonegap将整个过程“转换”为本地应用程序,然后以某种方式在整个过程中包装推送通知。

two questions: 两个问题:

  • is this a valid approach in the first place, or would something else be suited better ? 这首先是有效的方法,还是其他方法更合适? (for example embed the web application in some container in a xcode app ? or something completely else ?) (例如,将Web应用程序嵌入到xcode应用程序中的某个容器中?还是完全嵌入其他容器中?)

  • how can i get my webapp working with phonegap ? 如何使我的Webapp与phonegap一起使用? (i can't put all into the www/ directory of a newly created phonegap app, for example due to the fact, that laravel stores the index.php in a public/ directory) (例如,由于无法将laravel将index.php存储在public /目录中,因此我无法将其全部放入新创建的phonegap应用程序的www /目录中)

I think its a valid approach. 我认为这是一种有效的方法。 I am using cordova, tested ionic as well for the same approach. 我使用的是cordova,同样的方法也经过离子测试。 I like the fact that i dont have to code for both ios and android same. 我喜欢我不必同时为ios和android编写代码的事实。

You have to write ajax request for your server like the laravel script you have mentioned here. 您必须像在这里提到的laravel脚本那样为服务器编写ajax请求。 The application will fetch data from the server and update the states of embeded webview. 该应用程序将从服务器获取数据并更新嵌入的Webview的状态。 The www/ will containe all the js, css, and angular mvc. www /将包含所有js,css和angular mvc。

Hope it helps. 希望能帮助到你。

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

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