ng(req, res) {
    const options = {
      directives: [ngApp.AppComponent],

      platformProviders: [
        ng2.provide(ng2U.ORIGIN_URL, {useValue: 'http://localhost:3000'}),
        ng2.provide(ng2U.BASE_URL, {useValue: '/'})

      ].concat(ng2U.NODE_HTTP_PROVIDERS, ng2U.NODE_LOCATION_PROVIDERS),

      providers: [
        ng2Router.provideRouter(ngRoutes.routes),
        ng2.provide(ng2U.REQUEST_URL, {useValue: req.originalUrl || '/'}),
        ng2U.NODE_PLATFORM_PIPES,
        ng2U.NODE_ROUTER_PROVIDERS,
        ng2U.NODE_HTTP_PROVIDERS
      ],

      data: {},

      async: true,

      beautify: true,
      preboot: {buffer: false, debug: true, uglify: false}//FIXME if buffer = true app is not launched anymore after rendering
    }

    res.render('index', options)
  }
Exemplo n.º 2
0
"use strict";
var router_1 = require('@angular/router');
var dashboard_component_1 = require('./hero/component/dashboard.component');
var heroes_component_1 = require('./hero/component/heroes.component');
var hero_detail_component_1 = require('./hero/component/hero-detail.component');
var routes = [
    {
        path: '',
        redirectTo: '/dashboard',
        pathMatch: 'full'
    }, {
        path: 'dashboard',
        component: dashboard_component_1.DashboardComponent
    }, {
        path: 'heroes',
        component: heroes_component_1.HeroesComponent
    }, {
        path: 'detail/:id',
        component: hero_detail_component_1.HeroDetailComponent
    }
];
exports.appRouterProviders = [
    router_1.provideRouter(routes)
];
//# sourceMappingURL=app.routes.js.map
Exemplo n.º 3
0
"use strict";
var router_1 = require('@angular/router');
var page1_component_1 = require('./page1.component');
var page2_component_1 = require('./page2.component');
var admin_component_1 = require('./admin.component');
var auth_guard_1 = require('./auth.guard');
exports.routes = [
    {
        path: 'page1',
        component: page1_component_1.Page1Component
    },
    {
        path: 'page2',
        component: page2_component_1.Page2Component
    },
    {
        path: 'admin',
        component: admin_component_1.AdminComponent,
        canActivate: [auth_guard_1.AuthGuard]
    },
    { path: '',
        component: page1_component_1.Page1Component
    }
];
exports.AUTH_PROVIDERS = [auth_guard_1.AuthGuard];
exports.APP_ROUTER_PROVIDERS = [
    router_1.provideRouter(exports.routes),
    exports.AUTH_PROVIDERS
];
//# sourceMappingURL=app.routes.js.map
    {
        path: '/home',
        component: home_component_1.HomeComponent,
        index: true
    },
    {
        path: '/flight-booking',
        component: flight_booking_component_1.FlightBookingComponent,
        canActivate: [flight_booking_guard_1.FlightBookingGuard],
        children: [
            {
                path: '/flight-search',
                component: flight_search_component_1.FlightSearchComponent,
                index: true
            },
            {
                path: '/passenger-search',
                component: passenger_search_component_1.PassengerSearchComponent
            },
            {
                path: '/flight-edit/:id',
                component: flight_edit_component_1.FlightEditComponent
            }
        ]
    }
];
exports.APP_ROUTER_PROVIDERS = [
    router_1.provideRouter(APP_ROUTES),
    flight_booking_guard_1.FlightBookingGuard
];
//# sourceMappingURL=app.routes.js.map
Exemplo n.º 5
0
import { provideRouter } from '@angular/router';

import { ShopperResultComponent } from './shopper-result/shopper-result.component';
import { CheckoutPrepareComponent } from './checkout-prepare/checkout-prepare.component';
import { CheckoutFormComponent } from './checkout-form/checkout-form.component';

export let routes = [
  { path: '', 
    children:[
      { path: '', component: CheckoutPrepareComponent, useAsDefault: true},
      { path: 'form/:checkoutId', component: CheckoutFormComponent },
      { path: 'status', component: ShopperResultComponent }
    ]
  },
  { path: '**', redirectTo:'' }
];

export let routeProvider = provideRouter(routes);
Exemplo n.º 6
0
"use strict";
var router_1 = require('@angular/router');
var login_component_1 = require("./login/login.component");
var notfound_component_1 = require("./notfound/notfound.component");
//import {DashboardComponent} from "./dashboard/dashboard.component";
var dashboard_routers_1 = require("./dashboard/dashboard.routers");
var routes = [
    { path: "", redirectTo: "login", pathMatch: "full" },
    { path: "login", component: login_component_1.LoginComponent }
].concat(dashboard_routers_1.routerDashboard, [
    { path: "**", component: notfound_component_1.NotFoundComponent }
]);
exports.appRouterProviders = [router_1.provideRouter(routes)];
//# sourceMappingURL=app.routes.js.map
 */
"use strict";
var ng_router = require('@angular/router');

var heroesComponent = require('./heroes.component');
var dashboardComponent = require('./dashboard.component');
var heroDetailComponent = require('./hero-detail.component');

var routes = [
    {
        path: '',
        redirectTo: '/dashboard',
        pathMatch: 'full'
    },
    {
        path: 'dashboard',
        component: dashboardComponent.DashboardComponent
    },
    {
        path:'heroes',
        component: heroesComponent.HeroesComponent
    },
    {
        path: 'detail/:id',
        component: heroDetailComponent.HeroDetailComponent
    }
];

exports.AppRouterProviders = [
    ng_router.provideRouter(routes)
];
"use strict";
var http_1 = require('@angular/http');
var app_routes_1 = require('./app.routes');
var router_1 = require('@angular/router');
var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic');
var app_component_1 = require('./app.component');
// enableProdMode();
var providers = [
    router_1.provideRouter(app_routes_1.APP_ROUTES),
    http_1.HTTP_PROVIDERS
];
platform_browser_dynamic_1.bootstrap(app_component_1.AppComponent, providers);
//# sourceMappingURL=main.js.map
Exemplo n.º 9
0
import { provideRouter } from '@angular/router';

import { PostListComponent } from '../posts/components/post-list/post-list.component';
import { PostNewComponent } from '../posts/components/post-new/post-new.component';
import { PostEditComponent } from '../posts/components/post-edit/post-edit.component';
import { WikiComponent } from '../wiki/components/wiki-list/wiki-list.component';
import { AboutComponent } from './components/about/about.component';
import { LoginComponent } from '../auth/components/login/login.component';
import { LoggedInGuard } from './guards/logged-in.guard';
import { LoggedOutGuard } from './guards/logged-out.guard';

export const routes = [
  { path: '', component: PostListComponent, terminal: true },
  { path: 'new', component: PostNewComponent, canActivate: [LoggedInGuard] },
  { path: 'edit/:id', component: PostEditComponent, canActivate: [LoggedInGuard] },
  { path: 'about', component: AboutComponent },
  { path: 'wiki', component: WikiComponent },
  { path: 'login', component: LoginComponent, canActivate: [LoggedOutGuard] }
];

export const APP_ROUTES_PROVIDER = provideRouter(routes);
Exemplo n.º 10
0
var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic');
var http_1 = require('@angular/http');
var core_1 = require('@angular/core');
var router_1 = require('@angular/router');
require('./rxjs-operators');
var router_2 = require('@angular/router');
var index_1 = require("./player-lite/index");
var DefaultController_1 = require("./DefaultController");
var UtilsServices_1 = require("./services/UtilsServices");
//import {RouteParams} from "@angular/router-deprecated";
//import {RouteParams} from "@angular/router-deprecated";
exports.routes = [
    { path: '', component: DefaultController_1.DefaultController },
];
exports.screenRouterProviders = [
    router_2.provideRouter(exports.routes)
];
var ScreenComponent = (function () {
    function ScreenComponent(utils, http) {
        this.utils = utils;
        this.http = http;
    }
    ScreenComponent.prototype.ngOnInit = function () {
        var _this = this;
        var params = this.utils.getUrlParams(window.location.href);
        this.screenid = params.screenid;
        index_1.PlayerVO.screenid = this.screenid;
        this.http.get('serverdata/screen_' + this.screenid + '.json').map(function (res) {
            var out = [];
            res.json().data.forEach(function (item) { out.push(new index_1.PlayerVO(item)); });
            return out;
Exemplo n.º 11
0
"use strict";var router_1=require("@angular/router"),landing_component_1=require("./landing/landing.component"),auth_component_1=require("./auth/auth.component"),dashboard_routes_1=require("./dashboard/dashboard.routes"),routes=[{path:"",component:landing_component_1.LandingComponent},{path:"auth",component:auth_component_1.AuthComponent}].concat(dashboard_routes_1.dashboardRoutes,[{path:"**",redirectTo:"/",terminal:!0}]);exports.appRouterProviders=[router_1.provideRouter(routes)];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC5yb3V0ZXMuanMiLCJhcHAucm91dGVzLnRzIl0sIm5hbWVzIjpbInJvdXRlcl8xIiwicmVxdWlyZSIsImxhbmRpbmdfY29tcG9uZW50XzEiLCJhdXRoX2NvbXBvbmVudF8xIiwiZGFzaGJvYXJkX3JvdXRlc18xIiwicm91dGVzIiwicGF0aCIsImNvbXBvbmVudCIsIkxhbmRpbmdDb21wb25lbnQiLCJBdXRoQ29tcG9uZW50IiwiY29uY2F0IiwiZGFzaGJvYXJkUm91dGVzIiwicmVkaXJlY3RUbyIsInRlcm1pbmFsIiwiZXhwb3J0cyIsImFwcFJvdXRlclByb3ZpZGVycyIsInByb3ZpZGVSb3V0ZXIiXSwibWFwcGluZ3MiOiJBQUFBL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KionLFxuICAgICAgICByZWRpcmVjdFRvOiAnLycsXG4gICAgICAgIHRlcm1pbmFsOiB0cnVlXG4gICAgfVxuXSk7XG5leHBvcnRzLmFwcFJvdXRlclByb3ZpZGVycyA9IFtcbiAgICByb3V0ZXJfMS5wcm92aWRlUm91dGVyKHJvdXRlcylcbl07XG4iLCJpbXBvcnQgeyBwcm92aWRlUm91dGVyLCBSb3V0ZXJDb25maWcgfSBmcm9tICdAYW5ndWxhci9yb3V0ZXInO1xuXG5pbXBvcnQgeyBMYW5kaW5nQ29tcG9uZW50IH0gZnJvbSAnLi9sYW5kaW5nL2xhbmRpbmcuY29tcG9uZW50J1xuaW1wb3J0IHsgQXV0aENvbXBvbmVudCB9IGZyb20gJy4vYXV0aC9hdXRoLmNvbXBvbmVudCc7XG5pbXBvcnQgeyBkYXNoYm9hcmRSb3V0ZXMgfSBmcm9tICcuL2Rhc2hib2FyZC9kYXNoYm9hcmQucm91dGVzJztcblxubGV0IHJvdXRlczogUm91dGVyQ29uZmlnID0gW1xuICB7XG4gICAgcGF0aDogJycsXG4gICAgY29tcG9uZW50OiBMYW5kaW5nQ29tcG9uZW50LFxuICB9LFxuICB7XG4gICAgcGF0aDogJ2F1dGgnLFxuICAgIGNvbXBvbmVudDogQXV0aENvbXBvbmVudFxuICB9LFxuICAuLi5kYXNoYm9hcmRSb3V0ZXMsXG4gIHtcbiAgICBwYXRoOiAnKionLFxuICAgIHJlZGlyZWN0VG86ICcvJyxcbiAgICB0ZXJtaW5hbDogdHJ1ZVxuICB9XG5dO1xuXG5leHBvcnQgY29uc3QgYXBwUm91dGVyUHJvdmlkZXJzID0gW1xuICBwcm92aWRlUm91dGVyKHJvdXRlcylcbl07XG5cbiJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
Exemplo n.º 12
0
import 'reflect-metadata';
import 'zone.js/dist/zone';
import {bootstrap} from '@angular/platform-browser-dynamic';
import 'todomvc-app-css/index.css';
import {provideStore, combineReducers} from '@ngrx/store';

import {todos, visibility, initialTodo, initialVisibility} from './app/reducers/todos';

import './index.scss';

import {provideRouter} from '@angular/router';
import {enableProdMode} from '@angular/core';
import {routes, Root} from './routes';

if (process.env.NODE_ENV === 'production') {
  enableProdMode();
}

bootstrap(Root, [
  provideRouter(routes),
  provideStore(combineReducers({todos, visibility}), {todos: [initialTodo], visibility: initialVisibility})
]);
Exemplo n.º 13
0
"use strict";
var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic');
var app_component_1 = require('./app.component');
var http_1 = require('@angular/http');
var router_1 = require('@angular/router');
var app_routers_1 = require('./app.routers');
platform_browser_dynamic_1.bootstrap(app_component_1.AppComponent, [http_1.HTTP_PROVIDERS, router_1.provideRouter(app_routers_1.AppRoutes)]);
//# sourceMappingURL=main.js.map
Exemplo n.º 14
0
var profile_component_1 = require('./profile/profile.component');
var login_component_1 = require('./login/login.component');
var delivery_component_1 = require('./delivery/delivery.component');
var payment_component_1 = require('./payment/payment.component');
var confirmation_component_1 = require('./confirmation/confirmation.component');
var agb_component_1 = require('./agb/agb.component');
var sendOrder_component_1 = require('./sendOrder/sendOrder.component');
exports.ROUTES = [
    { path: '', component: home_component_1.HomeComponent },
    { path: 'article', component: articleInventory_component_1.ArticleInventoryComponent },
    { path: 'article/:id', component: article_component_1.ArticleComponent },
    { path: 'logout', component: logout_component_1.LogoutComponent },
    { path: 'login', component: login_component_1.LoginComponent },
    { path: 'shoppingcart', component: shoppingcart_component_1.ShoppingcartComponent },
    { path: 'about', component: about_component_1.AboutComponent },
    { path: 'contact', component: contact_component_1.ContactComponent },
    { path: 'impressum', component: impressum_component_1.ImpressumComponent },
    { path: 'register', component: register_component_1.RegisterComponent },
    { path: 'insertArticle', component: createArticle_component_1.CreateArticleComponent },
    { path: 'profile', component: profile_component_1.ProfileComponent },
    { path: 'checkout/delivery', component: delivery_component_1.DeliveryComponent },
    { path: 'checkout/payment', component: payment_component_1.PaymentComponent },
    { path: 'checkout/confirmation', component: confirmation_component_1.ConfirmationComponent },
    { path: 'agb', component: agb_component_1.AGBComponent },
    { path: 'checkout/order', component: sendOrder_component_1.SendOrderComponent }
];
exports.APP_ROUTER_PROVIDERS = [
    router_1.provideRouter(exports.ROUTES)
];
exports.routing = router_1.RouterModule.forRoot(exports.ROUTES);
//# sourceMappingURL=app.routes.js.map