Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure ng-demos as Angular 1 style-guide #96

Open
francisrod01 opened this issue Jun 12, 2017 · 0 comments
Open

How to configure ng-demos as Angular 1 style-guide #96

francisrod01 opened this issue Jun 12, 2017 · 0 comments

Comments

@francisrod01
Copy link

francisrod01 commented Jun 12, 2017

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!

@francisrod01 francisrod01 changed the title How to configure html5Mode in modular, playground, etc How to configure modular or playground as Angular 1 style-guide Jun 12, 2017
@francisrod01 francisrod01 changed the title How to configure modular or playground as Angular 1 style-guide How to configure ng-demos as Angular 1 style-guide Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant