This repository covers material in 2 screencasts,
This is an extension of my screencast Intro to Angular JS that focuses more on intermediate/advanced topics and walks through creating a working web application on top of the Laravel 4 Web Application Framework.
Things you can expect to learn from End to End with Angular JS:
- $http
- $rootScope
- taking the AuthenticationService we built earlier end-to-end
- creating a FlashService for displaying alerts to users
- access control for client-side routes with $rootScope and $routeProvider
- $httpProvider.responseInterceptors and logging out users automatically if serverside sessions expire
- $routeProvider.resolve property and making view rendering data dependent
- laravel 4 migrations, controllers, models, and authentication
Things you can expect to learn from Security with Angular JS:
- 3 common-sense ways to secure your web application
- angular.constant
- ng-init
- ng-sanitize
- Laravel CSRF support, route filters, and built in protection
- Laravel 4
- PHP 5.4 or higher
- MCrypt
- MySQL or SQLite
- AngularJS 1.1.4
Installing PHP 5.4 and MCrypt is the most tedious part of getting up and running with this example, but Laravel 4 is so nice that I think it's worth it. Here's the basic instructions for getting up on Mac OS X:
- Install Homebrew
- Make sure you correct any problems that
brew doctor
detects - Install Laravel 4
- Tap the PHP keg from @josegonzalez:
brew tap josegonzalez/php
- Install PHP 5.4
brew install php55
- Install MCrypt
brew install php55-mcrypt
(this will automatically link the binary into the php.ini for you) - Install Composer
brew install composer
(think of it like homebrew, or npm, or apt-get, but for PHP modules)
- clone this repo:
git clone https://github.com/davemo/end-to-end-with-angularjs.git
- install composer dependencies
composer install
- create a database called
laravelapp
- create your unique security key
php artisan key:generate
- run database migrations
php artisan migrate
- seed the database
php artisan db:seed
- run the app
php artisan serve
- browse to
http://localhost:8000
and log in with email[email protected]
and passwordadmin
Once you have the app up and running you can visit http://localhost:8000
and you will see the Login Form.
If you liked this code and screencast you should follow me on twitter: @dmosher
Happy Coding! :)