ng-demos
ng-demos copied to clipboard
How to configure ng-demos as Angular 1 style-guide
I don't understand how to configure $locationProvider.html5Mode(true)
in modular
and other projects as follow in Angular 1 styleguide
I try in routerhelper.js
to insert as below:
...
//below at
routehelperConfig.$inject = ['$locationProvider'];
routehelper.$inject = ['$location', '$rootScope', '$route', 'logger', 'routehelperConfig'];
function routehelperConfig($locationProvider) {
/* jshint validthis:true */
this.config = {
// These are the properties we need to set
// $routeProvider: undefined
// docTitle: ''
// resolveAlways: {ready: function(){ } }
locationProvider : $locationProvider
};
function routehelper($location, $rootScope, $route, logger, routehelperConfig) {
...
var $locationProvider = routehelperConfig.config.locationProvider;
$locationProvider.html5Mode(true);
. ..
but now, everytime that I open in browser the url /dashboard
or /wherever
, Angularjs insert #!/
on final of url turning /wherever#!/
.
Update
I try to implement routerHelperProvider
to use configureStates
as Angular 1 style-guide but now anywhere html is injected on browser.
Here, my gist with this scripts
https://gist.github.com/francisrod01/55d870dab73b20f6e882ee4265c37526
Issue 75 - no mondodb data in ngCodeCamper.zip
How can I do that correctly?
Thanks!