angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

Route config should contain exactly one "component", "loader", or "redirectTo" property. #388

Open amritk opened 8 years ago

amritk commented 8 years ago

Every time I have multiple viewports, I get this error: "Route config should contain exactly one "component", "loader", or "redirectTo" property." I guess its because I am using components instead of component. I got the code from this page http://blog.thoughtram.io/angularjs/2015/02/19/futuristic-routing-in-angular.html. Is there a more up to date location for resources on the new router with angular 1.5? Heres my code:

            $router.config([
                {
                    path: '/angular/amrit',
                    components: {
                            navigation: 'amrit',
                            main: 'auth'
                          }
                },
                {
                    path: '/angular/auth',
                    component: 'auth'
                },

            ]);
horyd commented 8 years ago

+1 I am also experiencing this issue. For some reasons "components" is not a recognised property in the RouteConfig of the angular_1_router.js build I have.