library recipe_book_routing;

import 'package:angular/angular.dart';

void recipeBookRouteInitializer(Router router, RouteViewFactory views) {
  views.configure({
    'add': ngRoute(
        path: '/add',
        view: 'view/addRecipe.html'),
    'recipe': ngRoute(
        path: '/recipe/:recipeId',
        mount: {
          'view': ngRoute(
              path: '/view',
              view: 'view/viewRecipe.html'
          ),
          'edit': ngRoute(
              path: '/edit',
              view: 'view/editRecipe.html'
          ),
          'view_default': ngRoute(
              defaultRoute: true,
              enter: (RouteEnterEvent e) =>
                  router.go('view', {},
                      startingFrom: router.root.findRoute('recipe'),
                      replace: true)
          )
        })
  });
}

library recipe_book_routing;

import 'package:angular/angular.dart';

void recipeBookRouteInitializer(Router router, RouteViewFactory views) {
  views.configure({
    'add': ngRoute(
        path: '/add',
        view: 'view/addRecipe.html'),
    'recipe': ngRoute(
        path: '/recipe/:recipeId',
        mount: {
          'view': ngRoute(
              path: '/view',
              view: '<view-recipe recipe-map="recipeMap"></view-recipe>'
          ),
          'edit': ngRoute(
              path: '/edit',
              view: 'view/editRecipe.html'
          ),
          'view_default': ngRoute(
              defaultRoute: true,
              enter: (RouteEnterEvent e) =>
                  router.go('view', {},
                      startingFrom: router.root.findRoute('recipe'),
                      replace: true)
          )
        })
  });
}

Test use HTMl inside view
Test use HTMl inside view

Signed-off-by: Andrés Amado <883768b6dd2c42aea0031b24be8a2da40fef4b64@uppoints.com>
