Build a Windows 10 App with Ionic 2 RC

What I don’t really understand is why it works on one machine and not another, when they should be at least the same angular version.

It seems to be the webview of windows (edge), wich was updated and incompatible with polyfill.js
It is not surprising when you know that polyfills are set of functions that emulate lack of support of certain native javascript methods.

When you simply serve your app in Edge you have the polyfill error and an other one in dom.js:

SCRIPT5007: Unable to get property '__symbol__' of undefined or null reference
dom.js (41,1)

ok, seems that it’s working with the help of


"ionic-angular": “2.0.0-rc.3-201612081620”

What does it mean to install platform 'browser 4.1.0", what does it provide?
I do not see it listed in the latest platforms?
https://cordova.apache.org/docs/en/latest/guide/support/index.html

Is it possible to build a Windows Form or WPF app that would run on Windows 7, for example?

Thank you

‘browser’ is to build your app with the intention of hosting it on a website, instead of as a mobile app. You install it with ‘ionic platform add browser’ and when your run ‘ionic build browser’ the contents of www are ready for use in a static website.

To build for windows 7 you can wrap your app as .exe using electron:

You just follow the instructions for the ‘getting started’ app, then build the ‘browser’ version of your app and copy the contents of www into your electrion app folder. Opening the exe then loads your app, which you can distribute as zip (or you could create an installer).

I do not see any change, when I updated Ionic this morning, setup a new project and ran it I still get the same original error which is:

Installing app…

Success: Your app was successfully installed.

Starting application…

ActivateApplication: com.ionicframework.newionictest971165_h35559jr9hy9m!com.ionicframework.newionictest971165

Exception calling “ActivateApplication” with “4” argument(s): “The remote procedure call failed. (Exception from
HRESULT: 0x800706BE)”
At C:\Users\jhoffman\Documents\ionictest\newIonicTest\platforms\windows\cordova\lib\WindowsStoreAppUtils.ps1:164 char:5

  • $appActivator.ActivateApplication($applicationUserModelId,$null,[ ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : COMException

Steps to recreate are:

  • ionic start test125 –v2
  • cd test125
  • ionic platform add windows
  • {added to the config.xml file }
  • ionic run windows

Here is my new ionic info:

Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.45
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v4.4.7
Xcode version: Not installed

After the update I still have angular 2.1.1, how do I update to 2.2.1 as mentioned by Demns in the ticket Creating and running a Windows 10 app with Ionic 2 RC · Issue #9267 · ionic-team/ionic-framework · GitHub

Thanks

Here are the steps I took based on Demns help (Creating and running a Windows 10 app with Ionic 2 RC · Issue #9267 · ionic-team/ionic-framework · GitHub ):

  • ionic start newIonicTest2 --v2
  • cd newIonicTest2
  • npm i --save @angular/forms@2.2.1 @angular/common@2.2.1 @angular/platform-browser@2.2.1 @angular/compiler@2.2.1 @angular/compiler-cli@2.2.1 @angular/core@2.2.1 typescript@^2.0.2 @angular/http@2.2.1 @angular/platform-browser-dynamic@2.2.1 @angular/platform-server@2.2.1 ionic-angular@2.0.0-rc.3-201612081620 rxjs@5.0.0-beta.12 zone.js@^0.6.26
  • ionic platform add windows
  • {added to config.xml file}
  • ionic run windows

And the application started correctly. AWESOME thank you for the help. At idea when angular 2.2.1 modules will be included with Ionic 2?

Thanks for the tip on electron, I will certainly look into it. That will save me for having to build a WPF/.NET browser wrapper app for my www content instead of letting my “young” audience go into a standard browser. So previously when I was doing ionic serve and getting www refreshed, I did upload the content of www for quick test/sharing purposes, and it seemed to run fine. How is that different when I do install browser and do ionic build browser’?
Let me know if there is a link where I can learn more about “browser” platform. Thank you.