Node.js 是否有可能创建一个网站和混合应用程序(使用离子)与相同的代码库,而不重写任何东西 我想创建一个网站及其混合应用程序使用离子,我检查了离子的文件,我创建了一个离子应用程序标签,但我也想处理我的网站与它,因此,如果请求来自Web,那么正常的HTML应与Web框架,如基金会,我不想重复代码的移动和Web。当我检查ionic生成的文件时,它看起来是这样的 <ion-modal-view> <ion-header-bar> <h1 class="title">Login</h1> <div class="buttons"> <button class="button button-clear" ng-click="closeLogin()">Close</button> </div> </ion-header-bar> <ion-content> <form ng-submit="doLogin()"> <div class="list"> <label class="item item-input"> <span class="input-label">Username</span> <input type="text" ng-model="loginData.username"> </label> <label class="item item-input"> <span class="input-label">Password</span> <input type="password" ng-model="loginData.password"> </label> <label class="item"> <button class="button button-block button-positive" type="submit">Log in</button> </label> </div> </form> </ion-content> </ion-modal-view> 登录 接近 用户名 密码 登录

Node.js 是否有可能创建一个网站和混合应用程序(使用离子)与相同的代码库,而不重写任何东西 我想创建一个网站及其混合应用程序使用离子,我检查了离子的文件,我创建了一个离子应用程序标签,但我也想处理我的网站与它,因此,如果请求来自Web,那么正常的HTML应与Web框架,如基金会,我不想重复代码的移动和Web。当我检查ionic生成的文件时,它看起来是这样的 <ion-modal-view> <ion-header-bar> <h1 class="title">Login</h1> <div class="buttons"> <button class="button button-clear" ng-click="closeLogin()">Close</button> </div> </ion-header-bar> <ion-content> <form ng-submit="doLogin()"> <div class="list"> <label class="item item-input"> <span class="input-label">Username</span> <input type="text" ng-model="loginData.username"> </label> <label class="item item-input"> <span class="input-label">Password</span> <input type="password" ng-model="loginData.password"> </label> <label class="item"> <button class="button button-block button-positive" type="submit">Log in</button> </label> </div> </form> </ion-content> </ion-modal-view> 登录 接近 用户名 密码 登录,node.js,frameworks,zurb-foundation,ionic-framework,hybrid-mobile-app,Node.js,Frameworks,Zurb Foundation,Ionic Framework,Hybrid Mobile App,那么,是否有可能对web和应用程序使用相同的代码(web基础和应用程序爱奥尼亚)是的,你可以! 您可以使用离子平台添加浏览器 然后您需要添加到您的节点js服务器 谢谢您的回答,但我的要求是,如果代码是为应用程序运行的,那么它应该使用Ionic framwork,如果代码是在web(移动+桌面)上运行的然后,它应该使用一些其他框架,这样它就不会看起来像一个运行在Web上的丑陋的移动应用程序。您需要将来自www的所有文件放入服务器的文档根目录中。如果将代码模块化,就可以切换htmls并实现它。(需要

那么,是否有可能对web和应用程序使用相同的代码(web基础和应用程序爱奥尼亚)

是的,你可以! 您可以使用离子平台添加浏览器 然后您需要添加到您的节点js服务器


谢谢您的回答,但我的要求是,如果代码是为应用程序运行的,那么它应该使用Ionic framwork,如果代码是在web(移动+桌面)上运行的然后,它应该使用一些其他框架,这样它就不会看起来像一个运行在Web上的丑陋的移动应用程序。您需要将来自www的所有文件放入服务器的文档根目录中。如果将代码模块化,就可以切换htmls并实现它。(需要重写html)或者你实际上使用了离子网格来给xl屏幕一个不同的外观。现在应该可以了。。。是的,你可以!您可以使用离子平台添加浏览器,然后需要添加到您的节点js服务器。