Results 1 to 4 of 4

Thread: How to use extjs 5 within non-extjs website

  1. #1
    Sencha User
    Join Date
    Mar 2014
    Posts
    6

    Default Answered: How to use extjs 5 within non-extjs website

    I want to use extjs 5 in my website which is not extjs based app.
    I have created extjs app within root directory of my application and built it using sencha cmd.
    When I use js and css files from build/production folder, it works fine because in production mode ext does not load other files, but instead loads just app.js from build/production/*** . However, during development I need to use full version instead of build for easy debugging, so I need to load files as are loaded from bootstrap.json file in typical extjs app.

    If I use bootstrap.js file it fails to load because it tries to load all files from ext directory relative to where it is included. Is there any way I can make this bootstrap.js file to work?

    I cannot use ext-all-debug.js because it fails to find required packages such as charts.

  2. Add following line in load() of bootstrap.js

    request.prependBaseUrl = true;


    for (i = 0; i < length; ++i) {
    Boot.loadUrl(urls[i], request);
    }

  3. #2

  4. #3
    Sencha Premium User
    Join Date
    Dec 2009
    Posts
    11
    Answers
    4

    Default

    Add following line in load() of bootstrap.js

    request.prependBaseUrl = true;


    for (i = 0; i < length; ++i) {
    Boot.loadUrl(urls[i], request);
    }

  5. #4
    Sencha User
    Join Date
    Mar 2014
    Posts
    6

    Default

    Yes it worked.

    I added
    Code:
    request.prependBaseUrl = true;
    
    before
    Code:
    for (i = 0; i < length; ++i) {
        Boot.loadUrl(urls[i], request);
    }
    Is there any way to set this with config file. e.g bootstrap.json?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •