Hello. Help to understand the issue of adding your template for the balun. I read a lot of documentation and questions, but I encounter a problem that I cannot understand. More precisely what I'm doing wrong.
There is a map. Tags add from JSON using objectManager
I expose objectManager.objects.options.set ('balloonLayout', 'MyBalloonLayout');
When I click on the label, I don’t get an open balun using a custom template, but I get an error in the console: Uncaught TypeError: Cannot read property 'getModuleSync' of null
var MyBalloonContentLayout = ymaps.templateLayoutFactory.createClass( '<h3>$[properties.balloonContentHeader]</h3>' + '<div>$[properties.balloonContentBody]</div>' + '<div> <a href="#" id="more">Подробнее</a></div>', { build: function() { MyBalloonContentLayout.superclass.build.call(this); $('#more').bind('click', this.onMoreClick); }, clear: function() { $('#more').unbind('click', this.onMoreClick); MyBalloonContentLayout.superclass.clear.call(this); }, onMoreClick: function() { alert('УРА'); } } ); // Добавляю опцию для балуна objectManager.objects.options.set('balloonContentLayout', 'MyBalloonContentLayout'); Link to sample code: https://codepen.io/anon/pen/mpyeRd?editors=1010
Please help me figure it out.