Description
See this Plunker: http://plnkr.co/edit/MppbR9UAlw7JkBW0JdD8.
When routing to a component that has any output bindings ('&'- bindings), ui-router fails with this error:
TypeError: Cannot read property '2' of null at https://unpkg.com/[email protected]/release/angular-ui-router.js:7096:54 at Array.map (native) at scopeBindings (https://unpkg.com/[email protected]/release/angular-ui-router.js:7096:7) at getBindings (https://unpkg.com/[email protected]/release/angular-ui-router.js:7101:17) at Array.map (native) at getComponentInputs (https://unpkg.com/[email protected]/release/angular-ui-router.js:7109:21) at config.templateProvider (https://unpkg.com/[email protected]/release/angular-ui-router.js:7074:34) at invokeResolveFn (https://unpkg.com/[email protected]/release/angular-ui-router.js:2786:37) at processQueue (https://unpkg.com/[email protected]/angular.js:16383:28) at https://unpkg.com/[email protected]/angular.js:16399:27
I understand from this issue that these bindings are not supported, but I still think, that ui-router should be able to route to these components, ignoring the output bindings, or at least display a more descriptive error message.
Of course, supporting these bindings would be another option. Maybe I'm approaching the component based architecture wrong, but I find myself writing several "wrapper"-components that wrap around the reusable other components to make ui-router able to route to them. I feel that this wrapping could more cleanly be handled with ui-router. Any comments on support for output bindings?
Regards,
Lucas