Commit 1a335585 authored by Hannah Stepanek's avatar Hannah Stepanek

fix onLogin in loggedout-message controller

The loggedout-message controller should bind onLogin. The sidebar-content
controller should also bind onLogin and call vm.login(). Prevously this behavior
was broken.
parent e86fa4a0
......@@ -355,6 +355,7 @@ module.exports = {
bindings: {
auth: '<',
search: '<',
onLogin: '&',
},
template: require('../templates/sidebar-content.html'),
};
......@@ -82,7 +82,7 @@ function configureRoutes($routeProvider) {
resolve: resolve,
});
$routeProvider.otherwise({
template: '<sidebar-content search="vm.search" auth="vm.auth"></sidebar-content>',
template: '<sidebar-content search="vm.search" auth="vm.auth" on-login="vm.login()"></sidebar-content>',
reloadOnSearch: false,
resolve: resolve,
});
......
......@@ -29,7 +29,7 @@
This annotation is not available.
<br>
You may need to
<a class="loggedout-message__link" href="" ng-click="vm.login()">log in</a>
<a class="loggedout-message__link" href="" ng-click="vm.onLogin()">log in</a>
to see it.
</span>
<span ng-if="vm.auth.status === 'logged-in'">
......@@ -47,5 +47,5 @@
thread="vm.rootThread">
</thread-list>
<loggedout-message ng-if="vm.shouldShowLoggedOutMessage()" on-login="vm.login()">
<loggedout-message ng-if="vm.shouldShowLoggedOutMessage()" on-login="vm.onLogin()">
</loggedout-message>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment