I have a app.js with defined routes and a menu with ng-href fields, like:
<li>
<a ng-href="{{user.nick}}"><i class="icon-th-large"></i>My Content Flow</a>
</li>
<li>
<a ng-href="{{user.nick}}/movie"><i class="icon-film"></i>My Videos</a>
</li>
<li>
<a ng-href="{{user.nick}}/blog_post"><i class="icon-pencil"></i> My Blogs</a>
</li>
<li>
Route Provider config:
$routeProvider
.when('/:searchType?/:searchValue?', {
templateUrl: 'partials/name/flow/',
controller: 'FlowCtrl'
})
.otherwise({
redirectTo: '/'
});
$locationProvider.html5Mode(true);
:searchType is the user nick
:searchValue is gallery, movie or blog_post
Sometimes, when I click on the link, angular.js refresh the whole page, doing an application re-initialization. Can I avoid the whole refresh without using special directives and why sometimes works and sometimes doesn't?
If you want to see the demo go on filmannex with:
email: [email protected]
password: testing
Thanks