1
I am creating an application where I will create something similar to a "Wizzard" windows Forms and for this I am using a routing as follows:
.state("vendaOrcamento", {
url: "/vendaOrcamento",
abstract:true,
templateUrl: "templates/comercial/vendaOrcamento.html"
})
.state('vendaOrcamento.cliente', {
url: "/cliente",
views: {
'tab-cliente': {
templateUrl: "templates/comercial/vendaOrcamento/1cliente.html"
}
}
})
.state('vendaOrcamento.produtos', {
url: "/produtos",
views: {
'tab-produtos': {
templateUrl: "templates/comercial/vendaOrcamento/2produtos.html"
}
}
})
I need that both for the son client as for the son products there is an object vendaOrcamento
global, so regardless of which child I am, I will always be working with the same object without losing the data already treated earlier, basically need this:
$scope.vendaOrcamento = {
cliente : {},
produtos : {}
}
My problem is that I don’t understand very well how I can work like this, I even tried to create a Controller
directly on view Dad(Mark) But it didn’t go very well... can someone give me a light please?
Preferably for the use of
controller as
– Bruno Wego