danwahlin / angularin20typescript Goto Github PK
View Code? Open in Web Editor NEWSimple AngularJS Applications with TypeScript
Simple AngularJS Applications with TypeScript
Thanks for creating this example!
I'm trying to figure out how to generate the TSD files. Running gulp reveals he following error:
[00:42:09] Finished 'gen-ts-refs' after 95 ms
src/app/app.module.ts(1,1): 6053 File '/home/ubuntu/pro-angular-js/AngularIn20TypeScript/tools/typings/tsd.d.ts' not found.
src/app/app.module.ts(2,1): 6053 File '/home/ubuntu/pro-angular-js/AngularIn20TypeScript/tools/typings/typescriptApp.d.ts' not found.
src/app/controllers/customers.controller.ts(1,1): 6053 File '/home/ubuntu/pro-angular-js/AngularIn20TypeScript/tools/typings/tsd.d.ts' not found.
[...]
I can manually install the TSD files for angular/jquery/etc, but it seems these particular missing TSD files are custom. Is that right?
I'm relatively new to this environment, so it's entirely plausible that I messed up something. Thanks.
Hi, Dan,
I'm trying to follow your example and try to "Generates the app.d.ts references file dynamically from all application *.ts files", but I found gulp-inject didn't support .ts extension file, On npm said gulp-inject "Default transforms and placeholders exists for injecting files into html, jade, jsx , less, slm, haml and sass / scss files.". And I try other example if I use *.js then it will work, but if I use *.ts then will not work. Do I need to do other setting on this?
src/app/services/data.service.ts(26,52): error TS2345: Argument of type '{ id: number; }' is not assignable to parameter of type 'IRequestShortcutConfig'.
Hi, I'm new to Angular and Typescript and was hoping to install this to start figuring things out. After running all the install commands and starting superstatic, IE11 opened with an error.
Fiddler shows 404s for all /js/*/.js files (no wonder IE had errors!)
From the gulp errors, the root cause appears that it could not compile the app's typescript files due to not finding typescriptApp.d.ts. I don't see a file named that anywhere in the directories.
The final result of the gulp errors is that I have no directory src/js next to src/app
Here's the end of the command line log including the gulp errors:
...(removed above and submodules from the following for brevity)
[email protected] node_modules\gulp-sourcemaps
[email protected] node_modules\del
[email protected] node_modules\gulp-debug
[email protected] node_modules\gulp-inject
[email protected] node_modules\gulp
[email protected] node_modules\superstatic
[email protected] node_modules\gulp-typescript
[email protected] node_modules\tsd
[email protected] node_modules\gulp-tslint
[email protected] node_modules\gulp-tsd
C:\ang\ang1.4\AngularIn20TypeScript>bower install
bower angular-animate#1.4.0 not-cached git://github.com/angular/bower-angular-animate.git#1.4.0
bower angular-animate#1.4.0 resolve git://github.com/angular/bower-angular-animate.git#1.4.0
bower angular#1.4.0 not-cached git://github.com/angular/bower-angular.git#1.4.0
bower angular#1.4.0 resolve git://github.com/angular/bower-angular.git#1.4.0
bower bootstrap#3.2.0 cached git://github.com/twbs/bootstrap.git#3.2.0
bower bootstrap#3.2.0 validate 3.2.0 against git://github.com/twbs/bootstrap.git#3.2.0
bower angular-bootstrap#0.10.0 not-cached git://github.com/angular-ui/bootstrap-bower.git#0.10.0
bower angular-bootstrap#0.10.0 resolve git://github.com/angular-ui/bootstrap-bower.git#0.10.0
bower angular-route#1.4.0 not-cached git://github.com/angular/bower-angular-route.git#1.4.0
bower angular-route#1.4.0 resolve git://github.com/angular/bower-angular-route.git#1.4.0
bower angular-bootstrap#0.10.0 download https://github.com/angular-ui/bootstrap-bower/archive/0.10.0.tar.gz
bower angular#1.4.0 download https://github.com/angular/bower-angular/archive/v1.4.0.tar.gz
bower angular-animate#1.4.0 download https://github.com/angular/bower-angular-animate/archive/v1.4.0.tar.gz
bower angular-route#1.4.0 download https://github.com/angular/bower-angular-route/archive/v1.4.0.tar.gz
bower jquery#>= 1.9.0 cached git://github.com/jquery/jquery.git#2.1.4
bower jquery#>= 1.9.0 validate 2.1.4 against git://github.com/jquery/jquery.git#>= 1.9.0
bower angular-bootstrap#0.10.0 extract archive.tar.gz
bower angular-bootstrap#0.10.0 invalid-meta angular-bootstrap is missing "ignore" entry in bower.json
bower angular-bootstrap#0.10.0 resolved git://github.com/angular-ui/bootstrap-bower.git#0.10.0
bower angular-animate#1.4.0 extract archive.tar.gz
bower angular-animate#1.4.0 resolved git://github.com/angular/bower-angular-animate.git#1.4.0
bower angular-route#1.4.0 extract archive.tar.gz
bower angular-route#1.4.0 resolved git://github.com/angular/bower-angular-route.git#1.4.0
bower angular#1.4.0 extract archive.tar.gz
bower angular#1.4.0 resolved git://github.com/angular/bower-angular.git#1.4.0
bower angular extra-resolution Unnecessary resolution: angular#1.4.0
bower bootstrap#3.2.0 install bootstrap#3.2.0
bower angular-bootstrap#0.10.0 install angular-bootstrap#0.10.0
bower angular-animate#1.4.0 install angular-animate#1.4.0
bower jquery#>= 1.9.0 install jquery#2.1.4
bower angular-route#1.4.0 install angular-route#1.4.0
bower angular#1.4.0 install angular#1.4.0
bootstrap#3.2.0 src\bower_packages\bootstrap
+-- jquery#2.1.4
angular-bootstrap#0.10.0 src\bower_packages\angular-bootstrap
+-- angular#1.4.0
angular-animate#1.4.0 src\bower_packages\angular-animate
+-- angular#1.4.0
jquery#2.1.4 src\bower_packages\jquery
angular-route#1.4.0 src\bower_packages\angular-route
+-- angular#1.4.0
angular#1.4.0 src\bower_packages\angular
C:\ang\ang1.4\AngularIn20TypeScript>tsd reinstall -so
-> running reinstall
written 4 files:
- angularjs/angular-animate.d.ts
- angularjs/angular-route.d.ts
- angularjs/angular.d.ts
- jquery/jquery.d.ts
C:\ang\ang1.4\AngularIn20TypeScript>gulp
[13:02:03] Using gulpfile C:\ang\ang1.4\AngularIn20TypeScript\gulpfile.js
[13:02:03] Starting 'ts-lint'...
[13:02:03] Starting 'compile-ts'...
[13:02:03] Starting 'gen-ts-refs'...
[13:02:03] Starting 'watch'...
[13:02:03] Finished 'watch' after 11 ms
[13:02:03] Finished 'gen-ts-refs' after 31 ms
[13:02:03] Finished 'ts-lint' after 210 ms
src\app\app.module.ts(2,1): error TS6053: File 'C:/ang/ang1.4/AngularIn20TypeScript/tools/typings/typescriptApp.d.ts' not found.
src\app\controllers\customers.controller.ts(2,1): error TS6053: File 'C:/ang/ang1.4/AngularIn20TypeScript/tools/typings/typescriptApp.d.ts' not found.
src\app\controllers\orders.controller.ts(2,1): error TS6053: File 'C:/ang/ang1.4/AngularIn20TypeScript/tools/typings/typescriptApp.d.ts' not found.
src\app\directives\filterTextbox.directive.ts(2,1): error TS6053: File 'C:/ang/ang1.4/AngularIn20TypeScript/tools/typings/typescriptApp.d.ts' not found.
src\app\services\customers.service.ts(2,1): error TS6053: File 'C:/ang/ang1.4/AngularIn20TypeScript/tools/typings/typescriptApp.d.ts' not found.
[13:02:03] TypeScript: 5 syntax errors
[13:02:03] TypeScript: emit failed
[13:02:03] Finished 'compile-ts' after 419 ms
[13:02:03] Starting 'default'...
[13:02:03] Finished 'default' after 50 µs
^CTerminate batch job (Y/N)? y
C:\ang\ang1.4\AngularIn20TypeScript>ss
Hey Dan, heard your talk at ngconf2015 and it was cool, but I missed how to add these Typescript libraries or plugins. I tried running tsd reinstall but I'm missing tsd.d.ts. I was hoping you can update the Readme.md with an updated documentation on getting started. Thanks again and really appreciate your work on educating the community on Angular and Typescript!
I have cloned this repository for use with Visual Studio 2015 vNext.
Having problems with gulp serve
. The browser is open, but fail the watcher. This is the logs:
$ gulp serve
[15:38:07] Using gulpfile ~/AngularIn20TypeScript/gulpfile.js
[15:38:07] Starting 'compile-ts'...
[15:38:07] Starting 'watch'...
[15:38:07] Finished 'watch' after 12 ms
[15:38:08] Finished 'compile-ts' after 1.17 s
[15:38:08] Starting 'serve'...
Starting browserSync and superstatic...
[15:38:08] Finished 'serve' after 37 ms
events.js:141
throw er; // Unhandled 'error' event
^
Error: watch node_modules/weinre/web/client ENOSPC
at exports._errnoException (util.js:870:11)
at FSWatcher.start (fs.js:1234:19)
at Object.fs.watch (fs.js:1262:11)
at createFsWatchInstance (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher.<anonymous> (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher.<anonymous> (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:82:15)
The line with Error: watch
change randomly when I run gulp serve
. Return lines like:
Error: watch node_modules/lodash/fp/thru.js ENOSPC
Error: watch node_modules/weinre/web/target ENOSPC
Error: watch node_modules/weinre/web/doc ENOSPC
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.