Closed maku closed 9 years ago
@maku, at the moment the angular2-now library implements decorators/annotations according to the Babel spec. I had a quick look at the typescript playground and it would appear that TypeScript implements annotations in the same way that Babel does. But, there are type checking and scoping considerations to consider.
Perhaps you could have a look at this fork by another user: https://github.com/nalbion/angular2-now
I don't know if it works, just noticed that it exists :)
Right now I don't have spare time to port angular2-now to TypeScript. If you'd like to help with that then I'm happy to accept the help.
Thanks for the hint. A quick test with the fork (https://github.com/nalbion/angular2-now) worked for me...
@maku Did you get this working w/o needing the fork?
I created the typescript definitions : https://github.com/pbastowski/angular2-now/issues/16
@robertbaker I wrote something myself
@maku Can you give me some hints? I'm using the master branch and it isn't working with JSPM/SystemJS
@robertbaker sorry I don't use angular2-now (wrote some decorators myself)
I am working on it and have a working beta version, but won't be able to release it until after I come back from my vacation in August. Sorry.
@pbastowski Can you share what you have with me?
I'm trying to implement this in an app currently under development and spent a lot of time refactoring the project to use it. If I can't use it, then I just wasted a weekend, and will basically have to re-do everything once it's released since it's under active development.
Sorry, it's on my laptop at home and I'm on vacation. I will be back around 13 August and will try to release it asap then.
However, you could for now just extract the core of my code, the part within the function wrapper, and then add "export" before each of my decorator functions. Then, jspm will see each exported function and make it visible when you import from the library.
Or, as suggested earlier, grab all the functions you need from the exported window.angular2now object.
I am curious how to use angular2-now with typescript and jspm. Any ideas?