On my publishing site I have changed its current navigation (quick launch) to use structural navigation, showing all items under current site. I see that the quick launch shows pages and sub sites for current site. However when I use my JSOM to retrieve all nodes in the quick launch it does not return any node at all and it seems it is empty, the rest api does not return any item either (_api/web/navigation/QuickLaunch) following is my code.
var clientContext = new SP.ClientContext.get_current();
var currentQL = clientContext.get_web().get_navigation().get_quickLaunch();
clientContext.load(currentQL);
clientContext.executeQueryAsync(Function.createDelegate(this, function (sender, args) {
var qlEnum = currentQL.getEnumerator();
var temp = "";
while (qlEnum.moveNext()) {
var node = qlEnum.get_current();
var title = node.get_title();
var url = node.get_url();
temp += title + ":" + url + "\r";
}
alert(temp);
}),
Function.createDelegate(this, function (sender, args) {
alert(args.get_message());
}));