I was trying to use the containerless statements like <!--ko if:IsShowData==true -->
of knockoutjs in hot towel template but it was not woring instead if i use visible binding with some element like div then it work very fine.(<div data-bind="visible: IsShowData==true"></div>
)
Can anybody tell me if containerless statements of knockoutjs doesnt work in hot towel template?
In Default Hot towel template i added few lines in home.html and home.js as follow:
views/home.html
<section>
<h2 class="page-title" data-bind="text: title"></h2>
</section>
<!-- ko if: active()==true -->
hiiiiiiiiiiiiiii
<!--/ko-->
<div data-bind="visible: active() == true">
byeeeeeeeeeeeee
</div>
And In viewmodels/home.js file
define(['services/logger'], function (logger) {
var vm = {
activate: activate,
active:ko.observable(false),
title: 'Home View'
};
return vm;
//#region Internal Methods
function activate() {
logger.log('Home View Activated', null, 'home', true);
return true;
}
//#endregion
});
i will see hiiiiiiii but i will not see byeeeeee