Results 1 to 4 of 4

Thread: routes

  1. #1

    Default routes

    hi, I need to use routes

    my code id

    PHP Code:

    Ext
    .define('MBilling.view.main.MainController', {    
    extend'Ext.app.ViewController',   
     
    alias'controller.main',   
      
    routes: {      
      
    'login''onRouteChange'  
      
    },

       
    onRouteChange: function(id) { 
           
    alert('test\e')   
     },
    }) 

    but, when I open the URL http://localhost/myapp/#login not execute the alert.

    thanks

  2. #2
    Sencha User
    Join Date
    Oct 2018
    Location
    Noida
    Posts
    56
    Answers
    10

    Default

    Do you have URL re-writing in your project ?
    If thats the case, it might be broken because of that, so you might need to add rule for that as well...

  3. #3

    Default

    Quote Originally Posted by praveensaini23 View Post
    Do you have URL re-writing in your project ?
    If thats the case, it might be broken because of that, so you might need to add rule for that as well...
    Thanks your help.

    I use Yii Framework on the backend. To try I remove all request to backend and ensure remove the .htaccess file.

    But not working.

  4. #4

    Default

    I found the issue.

    in my code I do not use

    PHP Code:
    mainView'MBilling.view.main.Main'
    I use

    PHP Code:
    Ext.widget('main'); 

    so, without mainView the routes not work. There is any method to if I open http://localhost/myapp/#signup open the widget('signup')

    Best regards

Posting Permissions

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