mirror of
				https://github.com/mdbootstrap/mdb-ui-kit.git
				synced 2025-11-04 09:57:36 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			329 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			329 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
'use strict';
 | 
						|
 | 
						|
var Buttons = new Mongo.Collection(null);
 | 
						|
 | 
						|
Template.hello.helpers({
 | 
						|
  buttons: function () {
 | 
						|
    return Buttons.find();
 | 
						|
  }
 | 
						|
});
 | 
						|
 | 
						|
Template.hello.events({
 | 
						|
  'click button': function (event, template) {
 | 
						|
    Buttons.insert({name: _.sample(['No, click ME!', 'Click me too!', 'Click here!', 'Hey!', 'Psst!'])});
 | 
						|
  }
 | 
						|
});
 |