We have created the view for the Login screen so far. As we are following the MVC architecture, we are not implementing the user interaction on the View
class. If we click on the buttons on the Login class, nothing will happen because we have not yet implemented this logic. We are going to implement this logic now on the controller class.
Under the app/controller
directory, we will create a new file named Login.js
. In this file we will implement all the code related to the events management of the Login screen.
Inside the Login.js
file we will implement the following code, which is only a base of the controller
class we are going to implement:
Ext.define('Packt.controller.Login', { // #1 extend: 'Ext.app.Controller', // #2 views: [ 'Login' // #3 ], init: function(application) { // #4 this.control({ // #5 }); } });
As usual, on the first line of the class we...