Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component and View typings not working #52

Closed
DamodarSojka opened this issue Dec 28, 2015 · 9 comments
Closed

Component and View typings not working #52

DamodarSojka opened this issue Dec 28, 2015 · 9 comments

Comments

@DamodarSojka
Copy link

Angular-meteor tutorial with angular2 is bugged from the first step. Component and View typings can't be imported from 'angular2/core' (I am including reference path="../typings/angular2-meteor.d.ts" / also import {bootstrap} from 'angular2/bootstrap'; works)

@barbatus
Copy link
Collaborator

No, it's not bugged. Read carefully what the first step says about System.js. Component and View typings can only be imported via NPM.

@DamodarSojka
Copy link
Author

I am afraid I don't understand what you mean. Also I guess that downloading code for step 0 and running meteor command should produce valid app, that's not the case typing is still wrong. Please let me know if I am terribly wrong!

@barbatus
Copy link
Collaborator

In the initial post you stated "Component and View typings can't be imported from 'angular2/core'". My answer was directly about that. If it's not right means you didn't have much desire to help yourself; sorry I am not a magician to foresee all potential issues you can get.

About step 0. I just downloaded zero step's code here https://github.com/Urigo/meteor-angular2.0-socially/archive/step_0.zip into an empty folder and run it from there. It worked out as expected: first typings were installed, then I re-ran the app with no any typings issues showed up.

Just try to do the same, and let me know about the result.

@DamodarSojka
Copy link
Author

I have tried it, typings are installed after running meteor command.
Line:
import {Component, View} from 'angular2/core';
still produces an error while line
import {bootstrap} from 'angular2/bootstrap';
is working properly.

@barbatus
Copy link
Collaborator

where does it produce errors? in the terminal?

@DamodarSojka
Copy link
Author

Terminal is not showing any errors, it is showing:
=> Client modified -- refreshing (x8)

Sublime text with TypeScript package is red underlying line :
import {Component, View} from 'angular2/core';

and word Socially in line:
class Socially { }

While terminal is showing information about refreshing browser still shows
text:
Nothing here yet!
regardless of content of app.html file.
But if template is provided inline istead of templateUrl it works as
expected.

Also as a side note zip for step zero has (step one is ok)
@view({
template: 'Hello World!'
})
I believe it should be templateUrl instead because thats what step 0
suggests.
Hopefuly my explaination is understandable, let me know if it is not.

On 29 December 2015 at 12:00, Alex notifications@github.com wrote:

where does it produce errors? in the terminal?


Reply to this email directly or view it on GitHub
#52 (comment)
.

@barbatus
Copy link
Collaborator

So it's your Sublime's problem, neither the package nor Meteor has nothing to do it with it. Configure your Sublime and that's it.

@DamodarSojka
Copy link
Author

It might be the case that it is also sublime problem. But then templateUrl
should work right?
Currently if I change .html file that templateUrl uses I am getting
--refreshing information but changes are not visible (so it is not
compiled?), inline templates are working as expected.

On 31 December 2015 at 03:48, Alex notifications@github.com wrote:

So it's your Sublime's problem, neither the package nor Meteor has nothing
to do it with it. Configure your Sublime and that's it.


Reply to this email directly or view it on GitHub
#52 (comment)
.

@barbatus
Copy link
Collaborator

Yes, 0-step's zip archive is outdated, but the tutorial and repo are right, follow them.
I'll rebuild new release archives soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants