Skip to content

fmunoz92/slim-angular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slim-angular

Example application(CRUD of articles) using angulajs with a php restfull api(slim + doctrine2 + smarty)

cd /var/www/ or cd yourlocalhostfolder
$ git clone https://github.com/fmunoz92/slim-angular.git
$ cd slim-angular
$ curl -s https://getcomposer.org/installer | php

Configure db:

create an empty database: for example "angularphp"

set config in bootstrap.php

define("DBHOST", '127.0.0.1');
define("DBDRIVER", 'pdo_mysql');
define("DBNAME", 'angularphp');
define("DBUSER", 'root');
define("DBPASS", '1');
define("DEBUG", 1);

then run

$ php composer.phar install
$ php vendor/bin/doctrine orm:schema-tool:update --force

finally run your browser in http://localhost/slim-angular

Files

Server-side:

Slim Routes definition

Articles doctrine entity

Index view

Client-side

Articles Controller

Routes definition

Handlebarsjs views