Skip to content

Problems to enable the profile.html #123

@jjgonver

Description

@jjgonver

I'm trying to enable profile.html from the user link but I don't understand well the logic of UI router for that.

  1. In the root's frontend I created a folder profile with profile.html inside
    /frontend/profile/profile.html
<div class="row">
  <p>
    Profile html test
  </p>
</div>

  1. This is the code in app.js:
...
  // Routes that needs authenticated user
        $stateProvider
          .state('profile', {
            abstract: true,
            template: '<ui-view/>',
            data: {
              access: AccessLevels.user
            }
          })
          .state('profile.edit', {
            url: '/profile',
            templateUrl: '/frontend/profile/profile.html',
            controller: 'ProfileController'
          })
        ;
...
  1. This is the code in core\layout\partial\header.html
...
<li class="pull-right"
       data-ui-sref-active="active"
       data-ng-show="auth.isAuthenticated()"
>
       <a href="#" data-ui-sref="profile.edit">{{user().username}}</a>
       </li>
...

In that way no error but don't load anything.
What am I doing wrong?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions