javascript - One controller and more than one template with ui-router? -


i'm trying figure out if need register 3 states 1 controller.

i have errors templates: 404.template.html, 505.template.html , feature.template.html

currently i'm registering ui-router feature.template.html, , associating controller him. other two? should register , associate same controller?

for example:

$stareprovider   .state({     url: '/error',     templateurl: '/admin/error/feature.template.html',     controller: 'errorcontroller',     controlleras: 'ctrl'   }); 

what other two: 404.template.html , 505.template.html?

thanks.

you can assign same controllers different states or directives. if remember correctly, instantiated separately scope variable not shared among each other.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -