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

Can I use angular-meteor with a newer version of Angular ? #33

Closed
ArthurianX opened this issue Oct 23, 2014 · 9 comments
Closed

Can I use angular-meteor with a newer version of Angular ? #33

ArthurianX opened this issue Oct 23, 2014 · 9 comments

Comments

@ArthurianX
Copy link

I saw that in this module the angular version preset is 1.0.2, that's > year old, angular is thousand times better now, can I easily integrate it with angular-meteor? Not easily, where would I need to start ?

FYI: I'm a meteor beginner.

@ArthurianX
Copy link
Author

thanks!

@rjsmith
Copy link
Contributor

rjsmith commented Oct 23, 2014

Hi,
Take a look in the smart.json file in the root folder of angular-meteor. It imports the angularJS library using bower (via the meteor-bower meteor package). At the time of writing, master is using angular 1.2.26
If you want to experiment with a 1.3.x version, you should just be able to update smart.json and see what happens ( I would also be interested in what u find out!)

@Urigo
Copy link
Owner

Urigo commented Oct 23, 2014

@ArthurianX you can also do that by adding the smart.json to your own project and then use https://github.com/mquandalle/meteor-bower to install what version that you want.
That way you won't need to change the package itself.

I hope that soon a better package of bower support will come out with better support for dependencies and then instead of deciding for you about the version and installing it, angular-meteor will just specify the minimum dependency.

@ArthurianX
Copy link
Author

Thanks very much!

I'll try to fiddle with it this weekend. I'll come back with an result.

@Urigo
Copy link
Owner

Urigo commented Nov 1, 2014

@ArthurianX Interested in hearing about your results!

@ArthurianX
Copy link
Author

Honestly I did not had time to do that yet, but I read a bit and I think the best way would be to use $interpolate (url:https://docs.angularjs.org/api/ng/service/$interpolate) in the config stages on the bootstrapping of Angular, before the template parsing, and thus using the angular library, whichever version as an external library.

This is not the solution for this module, but is a solution for curly braces vs square braces.

Now, for the rest of it, a good angular developer with some Meteor knowledge will know not to start using $http or Restangular to get data, but rely on Meteor's magic and simply use angular to do frontend stuff and whenever there is a change pass it to Meteor's collections methods.

And I think it's pretty easy to wrap promises around the meteor responses if you want to decouple meteor's tools for rendering content from the equation, and use it mostly as a super awesome communication gateway, plus the other features which I still have to delve in to :).

Been doing a lot of reading on Meteor though, and I'm trying my hand at a simple app.

Of course, using Angular with reactive templating and stuff like that from meteor will give a few headaches.

This is a simple options, quick and dirty, now for this package, I read the tutorial, it's a fairly complex merge between Angular and Meteor, and truly, reading about what meteor can do, and the roadmap for Angular 2.0 have turned me a bit off, I mean, I'd rather use meteor features where they behave best and integrating Angular so deep inside the Meteor workflow has lost it's charm on me, personally.

This comment is heavily opinionated, take it with the properly amount of salt :)

@wuxianliang
Copy link

there is a fork for 1.3 https://github.com/saleswise/angular-meteor/

@Urigo
Copy link
Owner

Urigo commented Nov 2, 2014

There is also a pull request here:
#41

I'm waiting for a bit of testing and I will merge it

@Urigo
Copy link
Owner

Urigo commented Nov 3, 2014

Merged and now we support AngularJS 1.3.1
Here is the release:
https://github.com/Urigo/angular-meteor/releases/tag/0.5.2

@Urigo Urigo closed this as completed Nov 3, 2014
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

4 participants