This is a demo and a tutorial showing how to develop an application using Yii 2.0 for creating REST API and then using it from UI built with AngularJS.
In order to install demo clone this repository:
git clone https://github.com/hscstudio/angular1-yii2 angular1-yii2 cd angular1-yii2
Then import database angular_spa.sql.
After it's done run the following:
cd web-service composer update --prefer-dist
Set database config in web-service\config\db.php.
Set up two hosts in your webserver. One should point to
web-client, aother to
web-service/web. Then set
variable in web-client\app.js to point to web-service URL.
Free open source