elgg_require_js() does not work?

Hi everyone,

I am using the version 1.12.0,

I have a page in mod/cmb/pages/ named 'play.php' with content:

<?php
    elgg_require_js("cmb/cmb");
    echo 'Hi <br/>';

cmb.js resides in mod/cmb/views/default/js/cmb, with content taken from tutorial:

define(function(require) {
    var elgg = require('elgg');
    var $ = require('jquery');

    $('body').append(elgg.echo('hello_world'));
});

I request the url http://localhost/elgg/cmb/play, which was registered to display play.php file, but I don't t get 'hello_world' below 'Hi'. 

What would be the reason for this problem?

 I also make random change to elgg_require_js("cmb/cmb");, e.g. Change "cmb/cmb" to "sdsds/cmb" does not show any error!, change elgg_require_js("cmb/cmb"); to elgsdsdg_require_js("cmb/cmb"); displays "Call to undefined function ...".

I have enabled developer tools, disable the cache ...

Thank you for viewing this.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking