I use an angular front end with Symfony. When I declare my $routeProvider
I have to include my /app_dev.php/
becuase I set the html 5 mode to true: $locationProvider.html5Mode(true);
.
$routeProvider.when('/app_dev.php/admin',
{templateUrl: 'index.html', controller: AdminCtrl})
.when('/app_dev.php/admin/schedule/',
{templateUrl: 'schedule.html', controller: ScheduleCtrl})
.otherwise('/app_dev.php/admin');
$locationProvider.html5Mode(true);
vs
$routeProvider.when('/admin',
{templateUrl: 'index.html', controller: AdminCtrl})
.when('/admin/schedule/',
{templateUrl: 'schedule.html', controller: ScheduleCtrl})
.otherwise('/admin');
$locationProvider.html5Mode(true);
The problem is I have to remember to change those routes back when I want to use the production environment.
I there a good way to handle this perhaps with assetic
when I do a dump to detect I am doing the dump for the dev
vs prod
or do I just have to painfully remember to change the paths for the target envirnment?
Thanks