Blame view
client/controllers/authenticated/header.js
682 Bytes
3b214be5e
|
1 2 3 4 5 6 7 8 |
/* * Controller: Header * Template: /client/includes/_header.html */ /* * Created */ |
76b8987a6
|
9 |
Template.header.onCreated(function(){ |
3b214be5e
|
10 |
// Code to run when template is created goes here. |
76b8987a6
|
11 |
}); |
3b214be5e
|
12 13 14 15 |
/* * Rendered */ |
76b8987a6
|
16 |
Template.header.onRendered(function() { |
3b214be5e
|
17 |
// Code to run when template is rendered goes here. |
76b8987a6
|
18 |
}); |
3b214be5e
|
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
/* * Helpers */ Template.header.helpers({ example: function(){ // Code to run for helper function. } }); /* * Events */ Template.header.events({ 'click .logout': function(){ Meteor.logout(function(error){ if(error){ |
c8b07469e
|
38 39 40 |
Bert.alert(error.reason, 'danger'); } else { Bert.alert('Succesfully logged out!', 'success'); |
3b214be5e
|
41 42 43 44 |
} }); } }); |