My web app is running on my PC through an Apache server, but I'm having issues with the routing provided by ui.route. It seems that the simple state I defined is never being reached.
To troubleshoot, I added a wildcard to catch all paths and found that the path ui.routing keeps receiving is: "".
Why is this happening?
Here's what my app.js looks like:
angular.module('populaApp', [
'populaApp.controllers','ui.bootstrap','ngEmbedApp','ui.router',
]).config( function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('state1', {
url: "*path",
templateUrl: "http://localhost/popula/app/html/tagsview.html",
controller: "listsController"
});
});
And here is my .htaccess file:
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html to allow html5 state links
RewriteRule ^ index.html [L]
In my controller, I have written:
console.log($stateParams);
which always outputs:
Object {path: ""}
No matter what the actual path is.
Any suggestions on how to resolve this issue?