Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Is it possible to use more than one model within the same app ?
I'm trying to do something like this:
module App
using GenieFramework using Stipple, StippleUI
import Main.UserModel: User import Main.PropostaModel: Cadastro
import Main.PropostaController: cadastroController import Main.UserController: userController
import Main.Views as view
route("/") do usermodel = User |> init usermodel |> userController page(usermodel, view.login()) |> html end
route("/home") do cadastromodel = Cadastro |> init cadastromodel |> cadastroController page(cadastromodel, view.home()) |> html end
end # module
This is user model: @vars User begin id = 0 nome = "" senha = "" email = "" empresa = "" btn_login = false bgmessage = "" iconmessage = "" message = "" opendialogmessagemstatuslogin = false end
The registration model is working normally, however the user model is loaded, but is not changing
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
I discovered the error. For some reason, the label parameter was not allowing the variable to be updated in the component. I just needed to remove the definition of the label="Usuário" field.
textfield("Usuário",
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
And it worked normally