1. #1
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    252
    Vote Rating
    26
    themightychris will become famous soon enough themightychris will become famous soon enough

      0  

    Default ST2-style routes for controllers

    ST2-style routes for controllers


    Here's a clean override that implements the routes config and redirectTo() method into controllers for ExtJS. It's compatible with the same syntax used in Sencha Touch but with one extra app-level option (see below) for efficient ExtJS initial rendering. I was able to do it with a lot less code than ST2 uses by weeding out all the ST1 routing artifacts littering it.

    https://github.com/JarvusInnovations...llerRouting.js

    Download locally or use right off GitHub:
    Code:
    Ext.application({
        requires: [
            'Jarvus.ext.override.app.ControllerRouting'
        ],
        paths: {
            Jarvus: 'https://raw.github.com/JarvusInnovations/ext-library/master/Jarvus'
        },
    
        suspendLayoutUntilInitialRoute: true, // true to suspend layouts during app startup until initial route is handled
        ...
    });
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly
    Co-founder @ Devnuts - Philadelphia Hackerspace

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,369
    Vote Rating
    200
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Thanks for sharing!
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

Thread Participants: 1