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
Post a Comment