本文将分享ionic2–在WindowsPhone10上运行Ionic2应用程序的详细内容,并且还将对在windows上运行ios进行详尽解释,此外,我们还将为大家带来关于asp.net-mvc–从M
本文将分享ionic2 – 在Windows Phone 10上运行Ionic 2应用程序的详细内容,并且还将对在windows上运行ios进行详尽解释,此外,我们还将为大家带来关于asp.net-mvc – 从MVC站点路由到Angular 2应用程序、ios – 如何将启动图像添加到Sencha Touch 2应用程序?、javascript – 如何将Electron ipcRenderer整合到基于TypeScript的Angular 2应用程序?、javascript – 托管Angular 2应用程序的相关知识,希望对你有所帮助。
本文目录一览:- ionic2 – 在Windows Phone 10上运行Ionic 2应用程序(在windows上运行ios)
- asp.net-mvc – 从MVC站点路由到Angular 2应用程序
- ios – 如何将启动图像添加到Sencha Touch 2应用程序?
- javascript – 如何将Electron ipcRenderer整合到基于TypeScript的Angular 2应用程序?
- javascript – 托管Angular 2应用程序
ionic2 – 在Windows Phone 10上运行Ionic 2应用程序(在windows上运行ios)
谢谢
解决方法
To build apps for Windows Universal,download and install Visual
Studio 2015 Community Edition. During the installation,Select “Tools
for Cross Platform Development” as well as the SDK for Windows
Universal Apps.With everything installed,you’ll be able to add a windows platform
from the command line with this command:
ionic platform add windows
By default the build command produces two packages: Windows 8.1 and
Windows Phone 8.1,which Ionic does not support. To upgrade Windows
package to version 10 the following configuration setting must be
added to configuration file (config.xml).
<preference name="windows-target-version" value="10.0" />
asp.net-mvc – 从MVC站点路由到Angular 2应用程序
在我的遗留Web应用程序中,计划是通过重定向到AppController上的相应操作来替换控制器操作代码,例如,
public ActionResult Action1(int param1,int param2) { return RedirectTo("Action1","App",new { param1,param2 }); }
AppController位于自己的区域(Areas.Web)中,该区域还包含Angular 2应用程序
public class AppController : Controller { public ActionResult Index() { return new FilePathResult("~/Areas/Web/index.html","text/html"); } public ActionResult Action1(int param1,int param2) { return Redirect($"/Areas/Web#/{param1}/{param2}/action1"); } }
在index.html中,我将基本href设置为
<base href="/Areas/Web/">
所以我的想法是让ASP.NET MVC抓住index.html并将其发送到浏览器,包括应该评估的哈希位置
/<param1>/<param2>/action1
在Angular方面,对吧?
在我的bootstrap代码中,我确保使用了HashLocationStrategy,
bootstrap(AppComponent,[provide(LocationStrategy,{ useClass: HashLocationStrategy })]) .then(success => console.log('Bootstrap success')) .catch(error => console.log(error));
app.component.ts的路由如下:
@RouteConfig([ { path: '/:param1/:param2/action1,name: 'Action1',component: Action1Component} ])
我认为这个设置应该正确地路由到Action1Component,但事实并非如此.路由配置完全被忽略,从不调用Action1的构造函数.
我哪里出错了?
编辑:Angular应用程序运行后实际工作的是
http://legacy.com/Areas/Web/<param1>/<param2>/action1
没有# – 但按F5显然会打破这个策略.因此,不仅包含散列符号的URL是无效路由,而且没有散列标记的URL完全有效.我糊涂了….
解决方法
import { bootstrap } from 'angular2/platform/browser'; import { provide } from 'angular2/core'; import { HTTP_PROVIDERS } from 'angular2/http'; import { ROUTER_PROVIDERS,LocationStrategy,HashLocationStrategy } from 'angular2/router'; import { AppComponent } from './app.component'; bootstrap(AppComponent,[ ROUTER_PROVIDERS,HTTP_PROVIDERS,provide(LocationStrategy,{ useClass: HashLocationStrategy } )]) .then(success => console.log('Bootstrap success')) .catch(error => console.log(error));
我的猜测是,与注入组件的任何其他服务一样,如果在组件装饰器的providers部分中声明ROUTER_PROVIDERS,则会获得一个新的Router实例,从而覆盖为HashLocationStrategy配置的实例,并且作为PathLocationStrategy是默认情况下,你就是这样.
ios – 如何将启动图像添加到Sencha Touch 2应用程序?
我使用Sencha CMD v3打包我的应用程序,加载时我没有看到任何启动图像.
在root / webapp / resources / loading /文件夹中有一些默认的启动映像,但它们没有显示在我的应用程序中.任何的想法?
“startupImage”似乎只适用于添加到主屏幕的应用程序,无论如何,这里是我的app.js的一部分:
startupImage: { '320x460': 'resources/startup/320x460.jpg','640x920': 'resources/startup/640x920.png','768x1004': 'resources/startup/768x1004.png','748x1024': 'resources/startup/748x1024.png','1536x2008': 'resources/startup/1536x2008.png','1496x2048': 'resources/startup/1496x2048.png' }
新增相关帖子:
> [2.1] Splash screen is white on startup on Android and iOS
解决方法
Ext.require([ 'Ext.XTemplate','Ext.Panel','Ext.Button','Ext.List' ]); // Main application entry point Ext.application({ phonestartupScreen: 'images/sencha_logo.png',name: 'Analytics',// setup our MVC items
这是一个方便的api文档链接:
http://docs.sencha.com/touch/2-0/#!/api/Ext.app.Application-cfg-phoneStartupScreen
javascript – 如何将Electron ipcRenderer整合到基于TypeScript的Angular 2应用程序?
电子方面很清楚:
const electron = require('electron'),ipcMain = electron.ipcMain,; ipcMain.on('asynchronous-message',function(event,arg) { console.debug('ipc.async',arg); event.sender.send('asynchronous-reply','async-pong'); }); ipcMain.on('synchronous-message',arg) { console.debug('ipc.sync',arg); event.returnValue = 'sync-pong'; });
但我不知道如何将该电子模块整合到我的Angular 2应用程序中.我使用SystemJS作为模块加载器,但我是一个菜鸟.
任何帮助赞赏.谢谢.
—马里奥
解决方法
There is conflict,because Electron use commonjs module resolving,but your code already compiled with systemjs rules.
两个解决方案
坚固的方式.注册对象需要返回:
<script> System.set('electron',System.newModule(require('electron'))); </script>
这是最好的,因为renderer / init.js脚本在启动时加载该模块. SystemJS必须只占用它,而不是加载.
替代方式.用声明使用脏话.
获取index.html中的电子实例:
<script> var electron = require('electron'); </script>
在你的类型文件文件中以这种方式声明它:
declare var electron: any;
自由使用)
electron.ipcRenderer.send(...)
javascript – 托管Angular 2应用程序
angular2-quickstart --app app.component.ts main.ts --node_modules --typings index.html package.json styles.css systemjs.config.js tsconfig.json typings.json
我需要在ftp上传什么文件?
我没有尝试任何东西,因为我不知道如何进行
提前致谢!
解决方法
我们今天的关于ionic2 – 在Windows Phone 10上运行Ionic 2应用程序和在windows上运行ios的分享就到这里,谢谢您的阅读,如果想了解更多关于asp.net-mvc – 从MVC站点路由到Angular 2应用程序、ios – 如何将启动图像添加到Sencha Touch 2应用程序?、javascript – 如何将Electron ipcRenderer整合到基于TypeScript的Angular 2应用程序?、javascript – 托管Angular 2应用程序的相关信息,可以在本站进行搜索。
本文标签: