angular-sailsjs-boilerplate
angular-sailsjs-boilerplate copied to clipboard
Problems to enable the profile.html
I'm trying to enable profile.html from the user link but I don't understand well the logic of UI router for that.
- 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>
- 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'
})
;
...
- 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