當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。