当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript angular2-meteor-auto-bootstrap.bootstrap函数代码示例

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


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

示例1: runWeb

function runWeb() {
  bootstrap(AppWebComponent, [
    disableDeprecatedForms(),
    provideForms(),
    APP_ROUTER_PROVIDERS,
    GOOGLE_MAPS_PROVIDERS
  ]);
}
开发者ID:Tallyb,项目名称:meteor-angular2.0-socially,代码行数:8,代码来源:main.ts

示例2: ionicProviders

 Meteor.startup(function() {
     // define array of bootstrap providers
     let providers = ionicProviders(args).concat(args.providers || [], METEOR_PROVIDERS);
     // bootstrap angular2
     bootstrap(cls, providers).then(appRef => {
         appRef.injector.get(TapClick);
         let app: IonicApp = appRef.injector.get(IonicApp);
         app.setProd(args.prodMode);
     });
 });
开发者ID:DFTinc,项目名称:ionic2-meteor-onyx,代码行数:10,代码来源:meteor-ionic-app.ts

示例3: generateData

    generateData().then(() => {
      bootstrap(Todos).then(compRef => {
        let ngZone = compRef.injector.get(NgZone);

        onStable(ngZone, () => {
          DataObserver.onReady(() => {
            onStable(ngZone, () => {
              expect($('.task', el).size()).to.equal(10);
              done();
            });
          })
        });
      });
    })
开发者ID:DAB0mB,项目名称:angular2-meteor,代码行数:14,代码来源:bootstrap.app-spec.ts

示例4: ionicProviders

 Meteor.startup(function() {
     // define array of bootstrap providers
     let providers = ionicProviders(args).concat(args.providers || [], METEOR_PROVIDERS);
     // auto add Ionic directives
     let directives = args.directives ? args.directives.concat(IONIC_DIRECTIVES) : IONIC_DIRECTIVES;
     // automatically provide all of Ionic's directives to every component
     providers.push(provide(PLATFORM_DIRECTIVES, { useValue: [directives], multi: true }));
     if (args.prodMode) {
         enableProdMode();
     }
     bootstrap(cls, providers).then( appRef => {
         postBootstrap(appRef, args.prodMode);
     });
     return cls;
 });
开发者ID:streetcred-app,项目名称:StreetcredMeteor1.3,代码行数:15,代码来源:meteor-ionic-app.ts

示例5: constructor

  constructor(private router: Router) {
    super();
    this.autorun(() => {
      this.idUser = Meteor.userId();
    });
  }

  logout() {
    let user = Meteor.users.findOne(Meteor.userId());

    Meteor.users.update(
      {
        _id: user._id
      }, {
        $set: {
          profile: {
            name: user.profile.name,
            status: 'offline'
          }
        }
      }
    );
    Meteor.logout();
    this.router.navigate(['Login']);
  }

}

bootstrap(Socially, [ROUTER_PROVIDERS, HTTP_PROVIDERS, provide(APP_BASE_HREF, { useValue: '/' })]);
开发者ID:RizkiMufrizal,项目名称:Socially-Angular2-Meteor,代码行数:29,代码来源:app.ts

示例6: bootstrap

import { bootstrap } from 'angular2-meteor-auto-bootstrap';
import { App } from './app.component';

bootstrap( App );
开发者ID:eques,项目名称:space,代码行数:4,代码来源:main.ts

示例7: constructor

import {MeteorComponent} from 'angular2-meteor/meteor_component';
import {bootstrap} from 'angular2-meteor-auto-bootstrap';
import {Parties} from '../collections/parties';
import {Mongo} from 'meteor/mongo';
import {AddItemsComponent} from './addItem';

@Component({
    selector: 'app',
    templateUrl: 'client/app.html',
    directives: [AddItemsComponent]
})
class AngTwoMeteorApp extends MeteorComponent implements OnInit {
    parties: Mongo.Cursor<Object>;

    constructor() {
        super();
    }

    ngOnInit() {
        console.log('ngOnInit');

        this.subscribe('parties', () => {
            this.parties = Parties.find();
        }, true);


    }
}

bootstrap(AngTwoMeteorApp);
开发者ID:aaronksaunders,项目名称:angular2-meteor-demo,代码行数:30,代码来源:app.ts

示例8: constructor

import reflectMetadata from 'reflect-metadata';
import angular from 'angular';
import angularMeteor from 'angular-meteor';
import { Component } from '@angular/core';
import { bootstrap } from 'angular2-meteor-auto-bootstrap';
import { Parties } from '../collections/parties';
import { Mongo } from 'meteor/mongo';
 
import template from './app.html';
 
@Component({
  selector: 'app',
  template
})
class Socially { 
	parties: Mongo.Cursor<Object>;

	constructor() {
	    this.parties = Parties.find();
  }
}
 
bootstrap(Socially);
开发者ID:acatmore,项目名称:socially,代码行数:23,代码来源:app.ts

示例9: bootstrap

import 'reflect-metadata';
import 'zone.js/dist/zone';
import { Component, provide } from '@angular/core';
import { bootstrap } from 'angular2-meteor-auto-bootstrap';
import { ROUTER_PROVIDERS, ROUTER_DIRECTIVES, RouteConfig } from '@angular/router-deprecated';
import { APP_BASE_HREF } from '@angular/common';
import { UserForm } from './imports/user-form/user-form.ts';
import { Manager } from './imports/manager/manager.ts';
import '../collections/methods.ts';

@Component({
  selector: 'app',
  templateUrl: 'client/app.html',
  directives: [ROUTER_DIRECTIVES]
})

@RouteConfig([
  { path: '/', as: 'UserForm', component: UserForm , useAsDefault: true},
  { path: '/manager/...', as: 'Manager', component: Manager }
])

class LaundryHelp {}

bootstrap(LaundryHelp, [ROUTER_PROVIDERS, provide(APP_BASE_HREF, { useValue: '/' })]);
开发者ID:BdEINSALyon,项目名称:LaundryHelp,代码行数:24,代码来源:app.ts

示例10: origBoot

  Meteor.startup(function() {
    origBoot(appComponentType, providers);

    Tracker.afterFlush(() => {
      if (preboot) preboot.complete();
    });
  });
开发者ID:barbatus,项目名称:ng2-todo-ssr,代码行数:7,代码来源:ng2-csr.ts


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