Feasability of Angular2 in Salesforce (through VF page)
If you're still interested in creating an Angular 2 app on the Salesforce platform I may have a solution for you. I myself love Angular 2 and everything it brings to the table. My company also works exclusively on Salesforce, so I wanted to figure out a way to marry the two.
What I ended up doing was create a boilerplate to make it easier to get started with Angular 2 on Salesforce. The boilerplate itself is available on Github at https://github.com/iDev0urer/salesforce-angular2-boilerplate and allows you to develop your application locally using the REST and SOAP API's to manipulate data. It also provides an easy way to deploy your app to Salesforce using gulp deploy
.
Please check it out and give me feedback!
Working with Angular 2 is a bit different than usual angular 1. It's highly recommended you create your Angular 2 apps with Typescript. To run the apps in your VF ( or in any browser) you need to transpile it to Javascript othwerise your browser will not understand.
As you build your angular 2 app in modules you need a module bundler as well which will bundle your modules into a one single javascript file.
There are some good tools out there which will do that for you automatically. Have a look at Webpack module bundler ans see if its your requirements.
Have a look at these tutorials for a more detailed explanation. angular 2 tutorials using VF as a container
All the best