[Ethereum] How would you integrate an Angular 2 CLI frontend project with a Truffle 2 project

guitruffle

I'm using Angular 2, with TypeScript, Webpack and all that on my main projects, so every time I have to go back to a Truffle project using AngularJS 1.x, a kitten dies and my head hurts a little.

How would you integrate an Angular 2 CLI frontend project with a Truffle 2 project?

Best Answer

I never use truffle 2, but this may help if you go to my project that I inegrate Angular 2 and truffle 3 together at https://github.com/Ratimon/MyDWallet. After you npm install, It is important to go to

node_modules/ethjs-abi/internals/webpack/webpack.config.js: and node_modules/ethjs-util/internals/webpack/webpack.config.js:

then change from loader: 'json' to loader: 'json-loader'