mithril.component.mdl.js
function(ctrl, attrs) {
			attrs = mButton.attrs(attrs);
			//	If there is a href, we assume this is a link button
		    return m(attrs.cfg.href? 'a': 'button', attrExclude(attrs.cfg, ['text']),
		    	(attrs.state.fab || attrs.state.icon?
		    		m('i', {className: "material-icons"}, attrs.cfg.text):
		    		attrs.cfg.text)
		    );
		}
function(ctrl, attrs) {
			attrs = mButton.attrs(attrs);
			//	If there is a href, we assume this is a link button
		    return m(attrs.cfg.href? 'a': 'button', attrExclude(attrs.cfg, ['text']),
		    	(attrs.state.fab || attrs.state.icon?
		    		m('i', {className: "material-icons"}, attrs.cfg.text):
		    		attrs.cfg.text)
		    );
		}
function ( ctrl , attrs ) { attrs = mButton . attrs ( attrs ) ; //	If there is a href, we assume this is a link button return m ( attrs . cfg . href ? 'a' : 'button' , attrExclude ( attrs . cfg , [ 'text' ] ) , ( attrs . state . fab || attrs . state . icon ? m ( 'i' , { className : "material-icons" } , attrs . cfg . text ) : attrs . cfg . text ) ) ; }
Always use the attrs, not ctrl, as it isn't returned from the default controller.
Always use the attrs not ctrl as it isn t returned from the default controller .