-
Notifications
You must be signed in to change notification settings - Fork 15
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
Create state without component? #10
Comments
Did you do the following? meteor add angularui:angular-ui-router And in your code SetModule('myApp', ['angular-meteor', 'ui.router']); |
Yes I have ui router installed and I have SetModule in my app.es6.js file. I think it was a load order issue, I made app.es6.js load first by putting it in /client/lib, now I get |
Do a
on your project. I've made a small change that should fix things for you. And then have a look at this: http://jsbin.com/tipeqa/edit?html,js,output for a working example. SetModule('my-app', ['ui.router']);
@State({
name: 'root', url: '', defaultRoute: 1,
templateUrl: 'root.html'
})
class rootRoute {
constructor() {
console.log('Root Route');
}
}
bootstrap(rootRoute); |
I ran meteor update and added templateUrl, still getting the following error.
I put up a repo so you can see how I am doing this. I'm probably just missing something. Still getting used to meteor, and your library. https://github.com/vacarsu/vdexter |
If you push your repo to github then i can have a look at what's wrong. |
I sent the link in the previous comment do you not have access to see it? I did look at the example and I have it setup up like that not sure where the error is coming from. |
Sorry, I'm not at the computer now :) |
That's okay no rush. I'll keep messing around with it maybe I'll figure it out. |
Hah okay thanks for your help works perfectly now. :) |
I have pushed a fix for the above error. So, if you provide @Inject with an empty array it will just ignore it.
|
Is there any other reason why I would be getting TypeError: Cannot read property 'length' of undefined again? it just randomly started happening again with or without @Inject I updated the repo if you want to check. |
It seems if I update to angular2-now from 0.2.9 to 0.3.1 the update doesn't take. I've tried from the command line and by hand in the versions file. edit: I got it updated to the most recent version by removing the package and reinstalling it. If I remove @Inject or leave it blank it works fine, but as soon as I actually inject something I get that error. |
@vacarsu good pickup :) Thanks for reporting this new error. I have fixed it and pushed version 0.3.2. Regarding updating to new package versions, before doing a |
Okay I will start stopping meteor before updating. And thanks for the quick updates! |
I'm trying to create a state without a component. The error I get is:
the state I'm trying to create:
and how do I add a view to the state, since templateUrl doesn't seem to work in @ State
The text was updated successfully, but these errors were encountered: