Wpis z mikrobloga

#angularjs #webdev

Mam problem z ui-router

Cały czas próbuje to ogarnąć ale coś nie chce iść :|

Gdy mam coś takiego:


.state(
'accounts', {
    url: 
'/panel/accounts',
    templateUrl: 
'views/accounts/index.html'
})
```Wszytko gra, ładuje treść z pliku ale gdy dodaje coś takiego:```


.state(
'accounts', {
              url: 
'/panel/accounts',
              templateUrl: 
'views/accounts/index.html',
              views: {
                  
"create_modal": {
                      templateUrl: 
'views/accounts/partials/create_modal.html'

                  }
              }
          })

Nagle już nie chce ładować widoku z views/accounts/index.html, co robię źle ?

w głównym widoku mam
  • 24
@istniejacy: zamiast

.state('accounts.create', {
url: '',
template: 'About template'
views: {
create_modal: {
template: 'About template'
}
}
}
)

Użyłem:

.state('accounts.create', {
url: '',
template: 'About template'
})

I działa ale teraz za to mi się #!$%@?ł ui-serf w menu do tej ściezki xD

Error: Cannot transition to abstract state 'accounts'