This repository accommodates the base framework I use for my angular JS projects, might not be up to date
Clone this git repository, be sure to take all the files.
Create a new file in /etc/apache2/sites-available containing the following code. Make sure to allow override. Without it angular route will not work.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName localhost
DocumentRoot /path/to/document/root
ErrorLog ${APACHE_LOG_DIR}/your_log_file.log
CustomLog ${APACHE_LOG_DIR}/your_custom_log_file combined
</VirtualHost>
<Directory /path/to/document/root>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Enable site: sudo a2ensite yoursitename
Restart site afterwards: sudo service apache2 restart
Open the file API/index.php, enter your database credentials like so
$dbuser = "yourDBUsername";
$dbpass = "yourDBPassword";
$dbmain = "yourDBName";
Open the file portal/index.php, then setup your base URL like so:
<base href="your/base/url"/>
Check the Angular version to make sure it is the one you want to use. By default Angular 1.5.6 is loaded
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
Open the file /portal/app/app.js, change the app name to your prefered application name like so
var app = angular.module('Your_prefered_application_name', [
'ngRoute',
'ngCookies',
'appControllers'
]);
Now you should be good to go. If not sucks to be you!