microsoft / ngconf2015demo Goto Github PK
View Code? Open in Web Editor NEWTodoMVC application demo for ng-conf 2015
TodoMVC application demo for ng-conf 2015
I was able to get to the point where I run "tsc", but I get "error TS6053: File 'typings/tsd.d.ts' not found".
The only thing that's in the typings/ folder is another folder "angular2" and it contains one file: "angular2.d.ts".
tsd reinstall had completed with this output:
tsd 0.5.7
-> running reinstall
written 1 file:
- angular2/angular2.d.ts
How do I unstuck myself?
The typescript version is not the latest one in npm.
{
"name": "ngconf2015-demo",
"version": "0.1.0",
"repository": { "url": "https://github.com/Microsoft/ngconf2015demo" },
"dependencies": {
"typescript": "mhegazy/typescript#v1.5-beta2",
"systemjs": "0.17.1"
}
}
I found this to be important as the one in the demo has expirementalDecorators, which is needed by the demo. But nowhere is this explained that if you grab TypeScript 1.5 beta that you will not get this.
Please update the demo and readme to explain how you recommended getting TS for this.
When a todo is double-clicked to edit, it should receive key events.
The todo is not focused, so typing and Esc do not affect it.
First, I had issues with missing file "lib.es6.d.ts" from tsc folder.
I manually added the file from github and completed powershell script.
Upon running the app in VS 2013 Ultimate with update 4,
getting several errors:
angular2-bundle.js:9838 Cannot resolve all parameters for TodoApp. Make sure they all have valid type or annotations.
-----async gap-----
Error
at Function.getStacktraceWithUncaughtError (http://localhost:5495/angular2/angular2-bundle.js:699:32)
at Zone.longStackTraceZone.fork (http://localhost:5495/angular2/angular2-bundle.js:758:43)
at Zone.bind (http://localhost:5495/angular2/angular2-bundle.js:64:21)
at Function.Zone.bindArguments (http://localhost:5495/angular2/angular2-bundle.js:195:22)
at t.obj.(anonymous function) as then
at Compiler.$__export.compileInHost (http://localhost:5495/angular2/angular2-bundle.js:29258:82)
at DynamicComponentLoader.$__export.loadIntoNewLocation (http://localhost:5495/angular2/angular2-bundle.js:18504:54)
at http://localhost:5495/angular2/angular2-bundle.js:29514:37
at Function.$__export.apply (http://localhost:5495/angular2/angular2-bundle.js:10108:23)
at _AsyncInjectorStrategy._findOrCreate (http://localhost:5495/angular2/angular2-bundle.js:26287:38)
Hi,
during your session at ng-conf, you mentioned, that you are still working on the used typescript-plugin for sublime. Where will we find this plugin? What's the link of it's repository?
Wishes,
manfred
I cloned the ngconf demo today; The update to VS2013 worked as I can peek/goto definitions. I ran the transpile using node, it appeared to work as I have a todo.js file. When I try to browse to index.html I see the GET of index.html in http-server console output followed by 30+ GETs of various bits of Angular, finishing with shim_css.js;
The only thing displayed in the browser is "Loading..."
Windows 8.1 64 bit, IE 11
tsd.json references old angular2 type definitions:
angular/di
module is missingFix:
I don't know if I'm missing something:
I tried node tsc/tsc.js from my command line and the node cli and got:
tsc/tsc.js
ReferenceError: tsc is not defined
at repl:1:2
at REPLServer.self.eval (repl.js:110:21)
at Interface. (repl.js:239:12)
at Interface.emit (events.js:95:17)
at Interface._onLine (readline.js:202:10)
at Interface._line (readline.js:531:8)
at Interface._ttyWrite (readline.js:760:14)
at ReadStream.onkeypress (readline.js:99:10
at ReadStream.emit (events.js:98:17)
at emitKey (readline.js:1095:12)
So, I skipped this step assuming VS 2015 CTP 6 would have typescript set up.
Didn't install the http server because VS2015 has IIS express and usually fits all my needs, also, haven't gotten to the point of something ready to be run, so didn't think it's relevant yet.
Ran the script:vs\VSDevMode.ps1 -vsVersion 14 -tsScript tsc\ and apparently did it properly:
Enabled custom TypeScript language service at C:\Users\Miguel\Documents\Visual Studio 2015\Projects\ngconf2015demo-maste
r\tsc\typescriptServices.js for Dev14
Enabled custom TypeScript default library at C:\Users\Miguel\Documents\Visual Studio 2015\Projects\ngconf2015demo-master
\tsc\lib.d.ts for Dev14
Enabled custom TypeScript default ES6 library at C:\Users\Miguel\Documents\Visual Studio 2015\Projects\ngconf2015demo-ma
ster\tsc\lib.es6.d.ts for Dev14
PS C:\Users\Miguel\Documents\Visual Studio 2015\Projects\ngconf2015demo-master>
Opened the web site and TS files are not recognized. I tried to run but only says "Loading"
So, I'm a bit confused: Do the node tsc command at the begining is necessary for VS 2015 CTP?
Should I use the http server? Doesn't seem necessary for VS but I'm heavily dependent on VS.
What am I missing?
Thanks in advance
The syntax highlighting does not appear to recognize interpolated strings as strings.
Try pasting the below into your TS file:
var str = `This throws the color off for the rest of the file: ', or until it gets to another apostrophe `);
var str2 = `In fact, the Github markdown has the same issue: ',now colors are back to normal. `);
On a related note: I'm excited to see such good TS editing in Sublime. I was just telling my team how good the intellisense is, the type inference, etc. Kudos.
When a new todo is empty (only whitespace), pressing Enter should not add it.
Any todo is added, even if it's empty.
I have read read this article "A Preview of Angular 2 and TypeScript in Visual Studio" and i wonder why at Microsoft you use node instead iis? Should i've use node also in production?
I followed the instructions very carefully, but it seems to me that TypeScript 1.5 has not been installed on my Visual Studio 2013. I repeated several times and kept restarting, but there is no luck. I do have TypeScript 1.4 installed. I have Node.js and Visual Studio 2013 installed on Windows 8.1 x64. TypeScript 1.4 is just fine. Can anyone help?
after running vs\VSDevMode.ps1 -vsVersion 14 -tsScript tsc\
Could not locate the TypeScript language service script at tsc\typescriptServices.js
所在位置 D:\dev\GitHub\ngconf2015demo\vs\VSDevMode.ps1:45 字符: 9
Throw "Could not locate the TypeScript language service scrip ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi,
I've played around with the sublime plugin and found out, that I get an error from sublime, when I try to export something, for instance a class:
export class Formatter {
format(str: String) {
return "*" + str.toUpperCase() + "*";
}
}
The error-message tells me, that I need to set the '--module' flag.
I've compared this to the provided sample to find out, why this issue dosn't arise there and found out, that sublime only shows this error, when there is no import-statement on the top of the file. When I add the following, for instance, everything is fine:
import {} from 'annotations';
Is there a way to work around that?
Wishes,
Manfred
I not have this file
When data is changed in one user session, it is not reflected in others until a key is hit or one of the todo items is checked. I am wondering where the issue lies. Is it Angular2, AngularFire, or this particular demo?
Example, if the view is in this state, the screen on the left is out of date until I hit the A key and then the two are in sync:
I've been playing around with the Sublime Text integration, and I'm very impressed. This looks like it's a copy from another repository (?), is there a main place to file issues?
I'm using +2 ws for blocks, +4 ws for overlong lines for indentation.
In Sublime Text, whenever I press enter, semicolon, or a number of other characters, the editor re-indents my contents to be +4 relativ to the last block starter (but also case label etc).
Any idea what's going on? I tried changing the hard coded 'tab_size' value in the .py plugin, to no avail.
Trying to build this demo app, I got the following errors from the TypeScript compiler:
todo.ts(1,37): error TS2305: Module 'angular2/angular2" has no exported memeber 'ngFor'.
todo.ts(1,44): error TS2305: Module 'angular2/angular2" has no exported memeber 'bind'.
I was able to get the demo running using Node. I wanted to make changes to todo.ts using VS. But it seems that TypeScript 1.5 is not registered properly. To register TypeScript, I did the following
powershell -ExecutionPolicy Bypass
vs\VSDevMode.ps1 -vsVersion 14 -tsScript tsc\
Here is the regedit screenshot
As mentioned in the issue #19 I copied the "lib.d.ts, lib.es6.d.ts, typescriptServices.js" from demo/tsc on to "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript".
But still my changes to the todo,ts are not getting compiled by Visual Studio
Am I missing something?
Hi, i cloned this repo amd when i try to build like the line in:
node tsc\tsc.js -m amd todo.ts
I get this error.
module.js:340
throw err;
^
Error: Cannot find module 'd:\\ngconf2015demo\tsc\tsc.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
Is there any adicional step i missed?
Compilation fails on Linux (Ubuntu 14.10) because
import {AngularFire, FirebaseArray} from 'firebase/Angularfire';
does not match the file firebase/angularfire.d.ts
.
The reference should be with a lowercase 'a' instead 'A'.
I am not able to make a pull request right now, sorry.
As microsoft/TypeScript#4011 mention, this demo makes VS 2015 RTM crash on opening ts file. You should provide updated information to the users of this demo. If not yet installed, then don't use the PS file to setup. If installed yet, then delete the three keys from regedit, before or after installing VS 2015 RTM.
I'm trying out the Sublime plugin that comes with this repository and it's working great.
One thing that I can't get working right though is imports. In the supplied examples everything works great but when I try to edit a .ts file in an other folder I get Cannot compile external modules unless the '--module' flag is provided
on any import statement.
Digging around in your repository I find tsconfig.conf that seems be responsible for getting the compiler to the right thing for your example.
{
"compilerOptions": {
"module":"AMD"
},
"files": [
"todo.ts"
]
}
So I tried copying this to the my own repository, replacing todo.js
with my own file, and restarting Sublime. I tried a bunch of different locations relative to the source path, and relative to my tsserver.js
. So far I've haven't had any luck. Any pointer would be much appreciated.
#7 Was closed, but I am still having the same issue.
I have upgraded to the latest version of Zone.js and that has not fixed the issue. I have also pulled down the latest source from this repo and it is still happening.
Can you add client-side routing to the example?
When todos are added and the page is refreshed, the persisted items should appear.
The persisted todos don't appear until user interaction happens, e.g. typing, switching filter.
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.