Trying to start a new angular2-meteor project using
npm install angular2-meteor --save
Get a whole bunch of red errors (below) and I am not sure what they mean. I have already done
npm install npm -g
and
npm update -g
Here's the error:
I think you followed the Quick Start here.
angular2-meteor package has not been exposed to NPM yet. Check this issue
UPDATE:
Refer here and here for latest tutorial.
Now you can install, follow these steps:
Update your meteor globally (If you already updated, then no need to do it again. And go here to check if there is a new version).
meteor update --release 1.3-rc.4
Run these in your terminal to create an angular2-meteor1.3 project:
meteor create --release 1.3-rc.4 hello
cd hello
npm install https://github.com/Urigo/angular2-meteor --save
npm install https://github.com/Urigo/angular2-meteor-auto-bootstrap --save
meteor remove blaze-html-templates
meteor add angular2-compilers
Remove main.js, main.html, main.css files in the client folder.
Then create these two files in your client folder:
// app.ts
import 'reflect-metadata';
import { bootstrap } from 'angular2-meteor-auto-bootstrap'
import { Component } from 'angular2/core';
@Component({
selector: 'app',
template: `<p>Hello World!</p>`
})
class App {}
bootstrap(App);
(Make sure you put import 'reflect-metadata';
first line before other import, otherwise it won't work.)
// index.html
<head>
<title>Hello</title>
</head>
<body>
<app></app>
</body>
At last, run meteor
in the terminal and go to http://localhost:3000
to check your app.