GithubHelp home page GithubHelp logo

angular2-meteor-auto-bootstrap's People

Contributors

barbatus avatar dotansimha avatar iperevozchikov avatar riscie avatar urigo avatar zanot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular2-meteor-auto-bootstrap's Issues

Installing with angular2-meteor 0.5.0-beta.1 Unmet Peer Dependency on wrong angular2

➜  test-ui-meteor npm install --save git+https://github.com/Urigo/angular2-meteor-auto-bootstrap.git

> [email protected] install /Users/bsmith/Development/git/qas/test-ui-meteor/node_modules/angular2-meteor-auto-bootstrap
> mv ./build/* ./

npm WARN saveError ENOENT: no such file or directory, open '/Users/bsmith/Development/git/qas/test-ui-meteor/package.json'
/Users/bsmith/Development/git/qas/test-ui-meteor
├── UNMET PEER DEPENDENCY angular2@^2.0.0-beta.6
└── [email protected]  (git+https://github.com/Urigo/angular2-meteor-auto-bootstrap.git#e09ba84d36ecf31c289fe2b71d32d181bd8bde57)

npm WARN enoent ENOENT: no such file or directory, open '/Users/bsmith/Development/git/qas/test-ui-meteor/package.json'
npm WARN [email protected] requires a peer of angular2@^2.0.0-beta.6 but none was installed.
npm WARN [email protected] requires a peer of angular2@^2.0.0-beta.0 but none was installed.
npm WARN test-ui-meteor No description
npm WARN test-ui-meteor No repository field.
npm WARN test-ui-meteor No README data
npm WARN test-ui-meteor No license field.

Angular2 sometimes bootstraps before meteor account information is ready.

Occasionally, angular2 and it's resulting components will initialize and render before meteor has finished synchronizing the the authenticated user account info to the client.

For components that perform redirect operations in the constructor, said component could send the user to the wrong route.

Here is a workaround I've used:

We wrap the boostrap function in a subscription and only execute the bootstrap function after the subscription's data is ready to be used.

// client/App.ts
Meteor.subscribe('userId', () => {
    bootstrap(App, [
        ...
    ]);
});

Here we are only publishing the user's id.

// server/publish.ts
export class Publish {
   static userId() {
      check(arguments, [Match.Any]);
      return Meteor.users.find(Meteor.userId(), {fields: {'_id': 1}});
   }
}

Meteor.publish('userId', Publish.userId);

While this is not a perfect fix, it does avoid this race condition.

The names "Promise" and "Reflect" in bootstrap.ts are undefined

Is bootstrap.ts missing an import statements for the Promise type returned by the bootstrap function?

Is it also missing an import statement for the Reflect object/class that is refered to within the defineMetadata function ?

If so where are these supposed to be imported from ?

I am getting error messages to the effect these names are undefined. Please advise.

GetLocation error

I have a link
<a [routerLink]="['TreesList']">Trees</a>
that works when I use
import {bootstrap} from '@angular/platform-browser-dynamic';
but when I switch to
import {bootstrap} from 'angular2-meteor-auto-bootstrap';
I get the following browser error:
screen shot 2016-05-14 at 7 05 22 am
screen shot 2016-05-14 at 7 05 44 am

0.5.4 breaking change detection of subscriptions on startup

modules.js:60044 TypeError: Cannot read property 'lastRootNode' of undefined
    at AppElement.attachView (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:55190:37)
    at ViewContainerRef_.insert (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:55392:23)
    at ViewContainerRef_.createEmbeddedView (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:55372:14)
    at NgFor._bulkInsert (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:76912:41)
    at NgFor._applyChanges (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:76865:14)
    at NgFor.ngDoCheck (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:76847:22)
    at AppView._View_ProjectMenuProjectSelectorComponent0.detectChangesInternal (ProjectMenuProjectSelectorComponent.template.js:107:42)
    at AppView.detectChanges (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:56194:22)
    at AppView.detectViewChildrenChanges (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:56223:34)
    at AppView.detectChangesInternal (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:56214:14)BrowserDomAdapter.logError @ modules.js:60044
modules.js:60044 ERROR CONTEXT:BrowserDomAdapter.logError @ modules.js:60044
modules.js:60044 DebugContextBrowserDomAdapter.logError @ modules.js:60044
modules.js:85656 Uncaught EXCEPTION: Error in ./ProjectMenuProjectSelectorComponent class ProjectMenuProjectSelectorComponent - inline template:12:38
ORIGINAL EXCEPTION: TypeError: Cannot read property 'lastRootNode' of undefined
ORIGINAL STACKTRACE:
TypeError: Cannot read property 'lastRootNode' of undefined
    at AppElement.attachView (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:55190:37)
    at ViewContainerRef_.insert (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:55392:23)
    at ViewContainerRef_.createEmbeddedView (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:55372:14)
    at NgFor._bulkInsert (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:76912:41)
    at NgFor._applyChanges (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:76865:14)
    at NgFor.ngDoCheck (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:76847:22)
    at AppView._View_ProjectMenuProjectSelectorComponent0.detectChangesInternal (ProjectMenuProjectSelectorComponent.template.js:107:42)
    at AppView.detectChanges (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:56194:22)
    at AppView.detectViewChildrenChanges (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:56223:34)
    at AppView.detectChangesInternal (http://localhost:3000/packages/modules.js?hash=0c9dd35cb39b5446f600a261723587f6a093b622:56214:14)
ERROR CONTEXT:
[object Object]

ProjectMenuProjectSelectorComponent is really simple:

@Component({
  selector: 'kui-project-menu-projects',
  // remove *simple* from below list to turn of html5 rendered menu
  template: `
    <div class="ui simple dropdown item" tabindex="0">
      <label>
        <span style="color: #9c9c9c;">
          Project: &nbsp;&nbsp;
        </span>
        <b>
          TODOS
        </b>
      </label>
      <i class="dropdown blue icon"></i>
      <div class="menu">
        <div class="item float right" *ngFor="let project of projects">
          {{ project.name }}
        </div>
      </div>
    </div>
  `
})
class ProjectMenuProjectSelectorComponent extends MeteorComponent {
  private projects: Mongo.Cursor<Project>;

  constructor() {
    super();

    this.projects = Projects.find();
    this.subscribe('projects');
  }
}

Downgrading to angular2-meteor-auto-bootstrap 0.5.2 fixes the problem.

package.json:

{
  "dependencies": {
    "angular2": "^2.0.0-beta.17",
    "angular2-meteor": "^0.5.4",
    "angular2-meteor-auto-bootstrap": "0.5.2",
    "dragula": "^3.6.8",
    "es6-shim": "^0.35.0",
    "lodash": "^4.11.2",
    "meteor-node-stubs": "^0.2.3",
    "ng2-dragula": "^1.1.6",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.6",
    "zone.js": "^0.6.12"
  },
  "devDependencies": {
    "codelyzer": "0.0.19",
    "rimraf": "^2.5.2",
    "spacejam": "^1.5.2",
    "tsconfig-lint": "^0.11.0",
    "typings": "^0.8.1"
  }
}

Type 'Control' is not assignable to type 'typeof Control'.

This code

constructor(private router: Router) {
        this.form.email = new Control('', Validators.compose([
            Validators.required,
            ValidationService.emailValidator
        ]));
        this.form.password = new Control('', Validators.required);
        this.authLoginForm = new ControlGroup(this.form);

}

gives these errors

client/imports/auth/login/login.ts (25, 9): Type 'Control' is not assignable to type 'typeof Control'.
Property 'prototype' is missing in type 'Control'.
client/imports/auth/login/login.ts (29, 9): Type 'Control' is not assignable to type 'typeof Control'.
client/imports/auth/login/login.ts (30, 47): Argument of type '{ email: typeof Control; password: typeof Control; }' is not assignable to parameter of type '{ [key: string]: AbstractControl; }'.
Index signature is missing in type '{ email: typeof Control; password: typeof Control; }'.

Angular2 RC5 Bootstrap changes

I notice that this package hasn't been updated to match the angular2-meteor package, and presume that with the NgModule changes in RC5 that it may not be needed.

In my app.module.ts file I have added:

import { METEOR_PROVIDERS } from 'angular2-meteor';

then in the providers property of the NgModule attribute I have added it:

@NgModule({
    imports: [BrowserModule, FormsModule, routing],
    declarations: [AppComponent],
    providers: [ appRoutingProviders, METEOR_PROVIDERS ],
    bootstrap: [ AppComponent ],
})
export class AppModule {}

Is this the right approach?

Cannot find module 'angular2-meteor-auto-bootstrap'

=> Client modified -- refreshingclient/app.ts (4, 25): Cannot find module 'angular2-meteor-auto-bootstrap'.
=> Client modified -- refreshing (x2)client/app.ts (4, 25): Cannot find module 'angular2-meteor-auto-bootstrap/bootstrap'.

Your tutorial for angular2 with meteor seem not to be up to date as well.

Angular2 RC1 - Uncaught No provider for PlatformRef!

Bootstrap causing this error -

Uncaught No provider for PlatformRef!
ReflectiveInjector_._throwOrNull    @   reflective_injector.js:776
ReflectiveInjector_._getByKeyDefault    @   reflective_injector.js:804
ReflectiveInjector_._getByKey   @   reflective_injector.js:767
ReflectiveInjector_.get @   reflective_injector.js:576
createPlatform  @   application_ref.js:41
MeteorApp.bootstrap @   tooltip-options.class.js:22
bootstrap   @   bootstrap.js:9
meteorInstall.node_modules.meteor.conflare-base.client.app.js   @   app.ts:47
fileEvaluate    @   install.js:141
require @   install.js:75
(anonymous function)    @   schema.ts:1
(anonymous function)    @   schema.ts:1

Updated Versions: "Uncaught No provider for ApplicationRef"

When using the newest Versions (Meteor 1.4.1-rc.0 and Angular 2.0.0-rc.5) the following error occurs (using angular2-meteor-base):

Issue

Repo to reproduce: https://github.com/Kamshak/new-version-test

angular2-meteor-base@ C:\Dev\strong-ostrich\testrepo
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| `-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | | +-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]
| | | | +-- [email protected]
| | | | `-- [email protected]
| | | |   `-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | | +-- [email protected]
| | | | `-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   | `-- [email protected]
| | |   +-- [email protected]
| | |   | +-- [email protected]
| | |   | `-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   | `-- [email protected]
| | |   +-- [email protected]
| | |   | +-- [email protected]
| | |   | `-- [email protected]
| | |   `-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| `-- [email protected]
|   `-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.