• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript angular2-redux.createAppStoreFactoryWithOptions函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中angular2-redux.createAppStoreFactoryWithOptions函数的典型用法代码示例。如果您正苦于以下问题:TypeScript createAppStoreFactoryWithOptions函数的具体用法?TypeScript createAppStoreFactoryWithOptions怎么用?TypeScript createAppStoreFactoryWithOptions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了createAppStoreFactoryWithOptions函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: createAppStoreFactoryWithOptions

import "reflect-metadata";

import {bootstrap} from "@angular/platform-browser-dynamic";
import {provide} from "@angular/core";
import {AppComponent} from "./app-component";

import {HTTP_PROVIDERS} from "@angular/http";
import {LocationStrategy, HashLocationStrategy} from '@angular/common';
import {ROUTER_PROVIDERS} from '@angular/router-deprecated';

import "angular2-materialize";

import {AppStore,createAppStoreFactoryWithOptions} from "angular2-redux";
import users from "./reducers/users-reducer";

const appStoreFactory = createAppStoreFactoryWithOptions({reducers:users,debug:true});

bootstrap(AppComponent, [
    provide(AppStore, {useFactory: appStoreFactory}),
    ROUTER_PROVIDERS, provide(LocationStrategy, {useClass: HashLocationStrategy}),
    HTTP_PROVIDERS
]);

/* tslint:disable */
// polyfill for Object.assign (not part of TS yet)
// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
if (!Object.assign) {
    Object.defineProperty(Object, "assign", {
        enumerable: false,
        configurable: true,
        writable: true,
开发者ID:Anhmike,项目名称:angular2-tutorial,代码行数:31,代码来源:main.ts


示例2: createAppStoreFactoryWithOptions

import { createAppStoreFactoryWithOptions } from 'angular2-redux';
import explore from './reducers/explore-page-reducer';
import home from './reducers/home-page-reducer';
import app from './reducers/app-reducer';

const AppStoreFactory = createAppStoreFactoryWithOptions({
    reducers: {
        app,
        explore,
        home
    }
});

export default AppStoreFactory;
开发者ID:KulikovskyIgor,项目名称:sport-route,代码行数:14,代码来源:store.ts


示例3: createAppStoreFactoryWithOptions

import {bootstrap} from "angular2/platform/browser";
import {provide} from "angular2/core";
import {HTTP_PROVIDERS} from "angular2/http";
import {AppComponent} from "./app";
import {AppStore,createAppStoreFactoryWithOptions} from "angular2-redux";
import parts from "./reducers/parts-reducer"
import cart  from "./reducers/cart-reducer"
import users from "./reducers/users-reducer"
import films from "./reducers/films-reducer"
import {PartActions} from "./actions/part-actions";
import {CartActions} from "./actions/cart-actions";
import {UserActions} from "./actions/user-actions";
import {FilmActions} from "./actions/film-actions";

const appStoreFactory = createAppStoreFactoryWithOptions({
                          reducers:{ parts, cart, users, films },
                          debug:true
                        });

bootstrap(AppComponent,
    [
        provide(AppStore, { useFactory: appStoreFactory }),
        HTTP_PROVIDERS,
        CartActions, PartActions, UserActions, FilmActions
    ]);

/* tslint:disable */
// polyfill for Object.assign (not part of TS yet)
// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
if (!Object.assign) {
    Object.defineProperty(Object, "assign", {
        enumerable: false,
开发者ID:besarthoxhaj,项目名称:react-intermediate3,代码行数:32,代码来源:main.ts



注:本文中的angular2-redux.createAppStoreFactoryWithOptions函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap