If I add this to a CMS page then it pull in the javascript to the page correctly:
<script type="text/javascript">
requirejs(['jquery', 'bootstrap'], function (jQuery, jQueryBootstrap) {
});
</script>
But if I try it with data attribute like so:
<div data-mage-init='{"bootstrap": {}}'>
</div>
Then the javascript is not pulled into the page.
Do data attributes only work in phtml files? Docs seem to say I can use either.