Angular website (www.angular.io) claims Angular can be used for "For web, mobile web, native mobile and native desktop." I'd like to find out more about native desktop capabilities but can't find anything on angular.io site. Can someone point me to some documentation or examples?
This is confusing, but there is no way to create a native desktop app with Angular2 only. Maybe this is the plan for the future, but it is not possible yet. But Angular2 is working quite well with Electron! I wrote a blog about it, unfortunately it is in German only :( But maybe you can simply translate it with the Google Translator: https://medium.com/@baerree/ich-packe-meine-koffer-angular-cli-electron-ii-28644342b956
Basically, you need to run the steps described here: http://www.blog.bdauria.com/?p=806
After building the electron skeleton around your app and did the Angular2 configuration steps described in the link, there is one thing to do:
The electron scope is missing inside your Angular2 scope. That means, if you want to access it you need to pipe electron inside Angular2. This is done by adding the following to your index.html (beware, this is not a clean solution):
<script>
var electron = require('electron');
</script>
after you did this, you need to tell typescript, that there is a electron variable now, by adding this to your typescript.d.ts:
declare var electron: any;
you can access electron inside Angular2 now by calling:
var app = electron.remote.app;
with the app variable you have full access to electron and your electron.js file. E.g. you could do things like that:
this.title = app.getAppPath();