Angular2 - Meteor tutorial already abandoned?

These are my experiences trying the Angular 2 Meteor tutorial today.

Several packages are out of date, requiring Angular2 RC.1 while the commands listed in the tutorial gives you Angular2 RC.3. The failed dependencies causes packages to not install until the requirements are manually modified.

The package angular2-meteor-polyfills is not mentioned in the tutorial, but Tutorial Step 0 fails if it is not installed.

After fixing that, I get to Step 3.5, where I get this error:

"@angular/platform-browser/src/browser_common" in
/home/sysadm/socially/node_modules/angular2-meteor-auto-bootstrap/build/bootstrap.js (web.browser)
                                              
If you notice problems related to these missing modules, consider running:
                                              
  meteor npm install --save @angular 

…the suggested npm command is not helpful, and browser_common was removed from platform-browser over a month ago.

All in all, this was not a confidence-inspiring experience…

3 Likes

Yes, it seems as if the tutorial and the npm package is really outdated,
I have this package.json, and it works not perfectly, but it works as it’s intended

package.json

{
  "name": "app",
  "private": true,
  "scripts": {
    "start": "meteor run"
  },
  "dependencies": {
    "@angular/common": "^2.0.0-rc.1",
    "@angular/compiler": "^2.0.0-rc.1",
    "@angular/core": "^2.0.0-rc.1",
    "@angular/http": "^2.0.0-rc.1",
    "@angular/platform-browser": "^2.0.0-rc.1",
    "@angular/platform-browser-dynamic": "^2.0.0-rc.1",
    "@angular/router": "^3.0.0-alpha.5",
    "angular2-meteor": "^0.5.5",
    "angular2-meteor-auto-bootstrap": "^0.5.5",
    "angular2-meteor-polyfills": "^0.1.1",
    "meteor-node-stubs": "~0.2.0"
  }
}

tsconfig.json

{
  "compilerOptions": {
    "experimentalDecorators": true,
    "module": "commonjs",
    "target": "es5",
    "isolatedModules": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "removeComments": false,
    "noImplicitAny": false,
    "sourceMap": true
  },
  "filesGlob": [
    "client/**/*.ts",
    "server/**/*.ts",
    "typings/**/*.d.ts"
  ],
  "exclude": [
    "node_modules"
  ]
}

Check if it works correctly for you, for me it’s working, but it’s using @angular/common@2.0.0-rc.1 and @angular/router@3.0.0-alpha.5 when the actual angular version is @angular/router": “^3.0.0-alpha.5”, and the router is @angular/router": “^3.0.0-alpha.5”, I think

This is the workaround I found for it, I guess community should start developing it, rather than @Urigo since it looks as he had stop with the developement of angular 2-meteor

Also, as I sidenote I would like to add that angular2-meteor is still using the deprected router, so the RouteConfig you have on your project right now is probably incorrect, you’ll need to change it. You can do this by reading this, as it says in the docs:

“The Component Router is in alpha release. This is the recommended Angular 2 router and supersedes the earlier deprecated beta and v2 routers.”

For more info check Angular 2 latest Typescript docs (angular.io) and Angular 2 repository changelog (github.com)

If you have any questions, just ask!
Miguel Rodriguez - mmiguerodriguez@gmail.com

Thanks for the tips. There is always a way to make things work, but when it is this broken out of the box it tell me that this is not a path I want to take :frowning:

3 Likes

Angular2-Meteor just updated two days ago

V3 router is not stable now, but becoming more stable. (Think about the short life of V2 router. Maybe you even haven’t time to try, it is already dead). I also stay with ngrx/router now.

For Angular2-Meteor tutorial, I think Dan Abramov (the person who create Redux)'s post can be a good explain:
https://twitter.com/dan_abramov/status/746506953992581120

This is not an excuse. And it will get better with time. But it takes time.

Yes, me too! I stopped using angular-meteor and started with meteor-react since it has a very nice implementation, I recommend you to do that.
Maybe some day we could get a working implementation…

Hongbo_Miao
Even if they say, documentation is difficult to do, I’m in, I’d really like to help with documentation on any project such as Meteor, ReactJs, Angular, angular-meteor, etc, since it’s going to help me, the community and the project itself.

I wanted to use Ionic2, that’s why I tried Angular2, but since the projects I’ve found involving Meteor/Ionic/Angular seem sleepy or dying I guess I do as you recommend :slight_smile:
Just tried OnsenUI2 + Meteor + React, up and running in 15 minutes with no errors :slight_smile:

I think that’s the better choice, at least for now, maybe in the future you could use Ionic2 with Angular2 and Meteor all on the same thing, but for now, it seems very difficult

I would say Angular 2 is very young. But it grows very fast.

I am using Angular2-Meteor for my own project, it is over 10k lines since May.

And I have succeed using many service, NPM packages, and Meteor packages: Angular 2, Meteor, RxJS 5, ngrx/store (Redux Store), ngrx/effects (Redux Saga), ngrx/router, Winston for logger, Loggly, Google Analytics, AWS S3, WebRTC, D3.js, Chart.js 2, Collection2, Roles, publish-composite, Mongo Aggregation, DdpRateLimiter, BrowserPolicy

As I replied @Urigo in my first post, I would love to help Angular2-Meteor, so more and More and MORE tutorials will come. : P

PR to improve for document issue is very welcomed!! It can benefit the whole community.

Didn’t understand what you meant with PR

Huh, it is Pull Request

Do you have a tutorial that walks you through this implementation (OnsenUI2+Reactjs+Meteor)?

No. I did implement a good part of my app using this stack, but it was SLOW. Especially on Android. UI updates not involving any database changes took seconds. Don’t know why.

So now I am building using Framework7 and Blaze. I wasn’t sure if FW7 was going to like Reacts DOM handling, so I went with Blaze. They work very well together, and even the new fancy 3D animations are snappy on older hardware.

Thanks for the response i will look into F7

So what with all the discussions that Reactjs will eventually replace Blaze?

We had way too much of that already. Blaze is and will be useful for quite some time.

1 Like

@jesperwe The tutorial has just been updated again, please check it out and let me know if it works for you.

I’ve been trying for a few months now to get the tutorial up and running, both by going step by step and by taking the last available zip file (step 22). There are always problems however. Is there a quick start method you can suggest? Can I just unzip the step 22 zip file and run? Honestly I’m ready to give up on Angular2 and Meteor, after spending a lot of time trying to learn it. I’d love to figure out how to get the full tutorial running.

Thanks

Hi everyone and sorry for the late response.
We were hard at work for updating to the latest Angular 2.0 stable.
Please try the new angular2-meteor@0.7.0, angular2-compilers@0.6.2_1 and the latest Angular 2.0.

We’ve update the Socially 2.0 tutorial (http://www.angular-meteor.com/tutorials/socially/angular2/bootstrapping) and the Blaze to Angular 2 migration tutorial (http://www.angular-meteor.com/migration/angular2/intro) for reference.

Sorry for the long wait, it was very hard to keep up with Angular 2 releases in latest months.

If you find issues, please open new ones on the Github repo.