Laravel 5 and Angular 2 Beta setup
Code Tutorial wrote a nice tutorial about Laravel 5 and Angular 2 beta setup
Like i did some time ago for AngularJS i want to write a simple tutorial useful to setup a new application using Laravel 5.2 and Angular 2 together using the asset pipeline offered by Laravel.
We are going to setup the 5 mins quickstart of Angular 2 Beta into a Laravel view. We will use Laravel Elixir to create a basic gulp task to compile the Typescript Angular code and to move some file.
<iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/v/dohhsLSbkYA?html5=1" frameborder="0" allowfullscreen>
Let’s start. After creating the basic Laravel application as first thing we need to gather all the source needed to run Angular 2 Beta and the Typescript compiler. In the main folder of the newly created application you can find a package.json file. Modify it by adding some dependencies like show below
package.json
{ "private": true, "devDependencies": { "concurrently": "^1.0.0", "del": "^2.2.0", "gulp": "^3.8.8" }, "dependencies": { "angular2": "2.0.0-beta.0", "bootstrap-sass": "^3.0.0", "elixir-typescript": "^1.1.2", "es6-promise": "^3.0.2", "es6-shim": "^0.33.3", "laravel-elixir": "^4.0.0", "reflect-metadata": "0.1.2", "rxjs"
Link:
This post is submitted by our members. Submit a new post.
Tags: Tutorials Laravel 5 Laravel 5.1 Laravel 5.2 Advanced Clips