28
Bunları durumda olabilir:UI yönlendirici URL'lerde sorgu dizesi parametresi?
Müşteri sorgu dizesi çekilir, ve benquotes.new
devlet sola am URL'yi
/quotes/new?customer=123
isabet
.state('quotes', {
abstract: true,
url: '/quotes'
})
.state('quotes.new', {
url: '/new',
templateUrl: 'views/quote-form.html',
controller: 'QuoteFormCtrl'
})
.state('quotes.new.customer', {
url: '?customer',
templateUrl: 'views/quote-form.html',
controller: 'QuoteFormCtrl'
})
?.
Bana en anlamlı olan şey,'un quotes.new
durum tanımına eklenmesidir, ancak bu bana hem url hem de params belirtmemi bildiren bir hata veriyor.
Yapmaya çalıştığım her şey çok takdir edilecektir.
Teşekkürler. Yaptığımdan daha basit olması gerektiğini biliyordum. – kbanman
Bu, $ state.go ile nasıl çalışır? '$ state.go ('quotes.new', {customer: 'dave'})'? – connorbode
[yup] (http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state#go) – calebboyd