Git Product home page Git Product logo

ngconf2015demo's Introduction

NOTE: This repo is no longer updated. Please refere to the Angular2 Quick Start guide at: https://angular.io/docs/ts/latest/quickstart.html for a Angular2 + TypeScript sample.

install:

npm install

Note: This demo uses SystemJS and es6-module-loader to transpile typescript files in the browser. It also uses a pre-release drop of TypeScript 1.5.2 from mhegazy/typescript#v1.5-beta2

run:

  • install http-server package via
npm install -g http-server 
  • run server (if port 8080 it taken, pick any port that is free)
http-server -p 8080

install typings (required for design time typechecking in editors)

npm install tsd -g
tsd reinstall
tsd rebundle

update Visual Studio:

Install TypeScript 1.5 or later releases:

update Sublime Text:

If you are using Package Control for Sublime Text, simply install the TypeScript package.

Alternatively, you can clone the repo directly.

ngconf2015demo's People

Contributors

alexeagle avatar danielrosenwasser avatar hansrwindhoff avatar hotell avatar mariannemyers avatar mhegazy avatar sophiajt avatar v2m avatar vladima avatar zbrad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngconf2015demo's Issues

Could not locate the TypeScript language service script at tsc\\typescriptServices.js

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 ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Could not locat...riptServices.js:String) [], RuntimeException
    • FullyQualifiedErrorId : Could not locate the TypeScript language service script at tsc\typescriptServices.js

I cannot get TypeScript 1.5 installed on my VS2013.

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?
image 2

Empty todos can be added

Expected

When a new todo is empty (only whitespace), pressing Enter should not add it.

Actual

Any todo is added, even if it's empty.

Error on Build

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?

export class in sublime

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

Unable to run the demo using VS 2015 CTP 6

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
reged

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?

Where will we find the Sublime-Plugin

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

VS 2015 RTM crash on opening ts file

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.

Where should tsconfig.conf go?

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.jswith 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.

Build error: tsc errors with "error TS6053: File 'typings/tsd.d.ts' not found"

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?

[st3] Ingores buffer indentation setting while typing

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.

Updates not realtime

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:
screenshot 2015-03-07 15 16 23
screenshot 2015-03-07 15 16 44

firebase/angularfire reference has wrong casing

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.

[st3] Syntax highlighting is incorrect for interpolated strings

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.

Demo application failure

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

'angular2/angular2' has no exported member NgFor / bind

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'.

Updates Not Realtime

#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.

A bit more help

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

Add Routing

Can you add client-side routing to the example?

Why you use node instead of iis? Question

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?

[email protected]: error: Cannot resolve all parameters for TodoApp.

  1. 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.

  2. 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)

mhegazy/typescript#v1.5-beta2

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.