-
Notifications
You must be signed in to change notification settings - Fork 50
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
Typescript support #51
Comments
Typescript is something I'd like to include in this generator (possibly Dart). Unfortunately, I don't have any experience with Typescript, so this may be a while. |
Hi, I've been looking into TypeScript the last few days and have a few questions regarding your opinion, if you have time. https://github.com/Keats/ng-boilerplate seems like a nice starting point. I haven't found a use for TypeScript's modules, though. Do you typically create modules when working with TypeScript? Importing the modules in a main app module doesn't sound too flexible, which are the only examples of modules used in Angular I've found. I'm completely on board for adding TypeScript's typing, interfaces, and classes; I just want to make sure I'm not overlooking TypeScript's modules. I will probably have time to get these added soon. |
Great! I am also not sure about Typescript module because it seems to share the same functionalities as angular module. Also, I will be able to help with adding Typescript because I need it soon in a project. |
I will work on this in a couple of days. Please let me know if you already started on this. |
Sounds good. I haven't started on it. |
Feel free to add more tasks or take on any of them. By the look of it, I feel like |
As for Typescript and AngularJs module, I feel like the current best solution is to have generate a new Typescript module along side with AngularJs module. |
I looked into this some more. TypeScript modules will need to be used, especially when passing functions is enabled. TypeScript modules allow us to have multiple functions with the same name (config, etc.) in the application, otherwise throws a compile error. Also, classes will have to be defined before we pass it to angular.module().controller(), etc. since TypeScript compiles it to JavaScript variable instead of function, so this causes hoisting issues. I'll try to get these changes added later this week/weekend, which should just about get this done. Then just the Karma issue. |
Working on Karma one now |
I think I have the available typings pulled in. It also runs |
Great! Thanks |
FYI, I've been using TypeScript in ng-poly in production for a while without major problem. Obviously, the module system can be improved but it is not a major problem for us. |
That's great to hear. Do you guys have any suggestions for improving the modules? The Gulpfiles have been updated to build the app and tests in a tmp directory for unit tests. The templates are updated. Unfortunately, there is an issue with angular-protractor and jQuery conflicting (DefinitelyTyped/DefinitelyTyped#2734) for e2e tests. |
Awesome! Thanks a lot! I will update our build to the latest version. |
tsd
to automatically pull in referencesThe text was updated successfully, but these errors were encountered: