Issue 1:
Using these dependencies:

"devDependencies": {
"ts-loader": "^0.7.2",
"typings": "^0.7.7",
"typescript": "^1.8.2",
"webpack": "^1.12.14",
"webpack-dev-server": "^1.14.1"
},
"dependencies": {
"angular2": "^2.0.0-beta.9",
"es6-promise": "^3.1.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "^0.1.2",
"rxjs": "^5.0.0-beta.2",
"zone.js": "^0.5.10"
}

and this tsconfig.json:

{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings/main.d.ts",
"typings/main"
]
}

and also correctly referencing /// <reference path="../node_modules/angular2/typings/browser.d.ts" /> from the boot.ts (bootstrap file)...

...I still get this TS errors during compilation:

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/wtf.ts
(5,13): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/geolocation.ts
(4,7): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/geolocation.ts
(4,27): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/geolocation.ts
(5,26): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/property-descriptor.ts
(69,19): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/event-target.ts
(7,13): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/event-target.ts
(8,41): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/event-target.ts
(36,19): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/event-target.ts
(36,34): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/websocket.ts
(5,18): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/websocket.ts
(8,14): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/websocket.ts
(11,9): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/register-element.ts
(5,77): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/register-element.ts
(23,32): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/register-element.ts
(26,40): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/register-element.ts
(29,38): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/mutation-observer.ts
(9,23): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/mutation-observer.ts
(12,3): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/mutation-observer.ts
(13,51): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/mutation-observer.ts
(15,29): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/mutation-observer.ts
(20,3): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/mutation-observer.ts
(29,3): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/mutation-observer.ts
(40,18): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/mutation-observer.ts
(44,9): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/mutation-observer.ts
(48,31): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/mutation-observer.ts
(51,49): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/functions.ts
(17,16): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/functions.ts
(17,43): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/functions.ts
(20,16): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/functions.ts
(20,45): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/functions.ts
(96,5): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/functions.ts
(101,14): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(8,17): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(30,18): error TS2304: Cannot find name 'process'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(30,62): error TS2304: Cannot find name 'process'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(112,76): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(119,26): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(120,12): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(131,7): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(137,26): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(138,18): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(147,23): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(150,3): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(168,9): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(172,31): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(175,49): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/utils.ts
(190,7): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/promise.ts
(24,5): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/promise.ts
(50,13): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/promise.ts
(91,7): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/promise.ts
(110,1): error TS2304: Cannot find name 'module'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/browser.ts
(13,33): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/browser.ts
(13,41): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/patch/browser.ts
(22,25): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/core.ts
(105,19): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/core.ts
(108,5): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/core.ts
(122,7): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/microtask.ts
(10,17): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/microtask.ts
(11,5): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/microtask.ts
(23,18): error TS2304: Cannot find name 'require'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/microtask.ts
(34,3): error TS2304: Cannot find name 'global'.

ERROR in ./~/zone.js/lib/browser/zone-microtask.ts
(13,3): error TS2304: Cannot find name 'global'.

ERROR in ./~/zone.js/lib/browser/zone-microtask.ts
(14,3): error TS2304: Cannot find name 'global'.

ERROR in ./~/zone.js/lib/browser/zone-microtask.ts
(14,21): error TS2304: Cannot find name 'global'.

ERROR in ./~/zone.js/lib/browser/zone-microtask.ts
(17,3): error TS2304: Cannot find name 'global'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/es6-promise/es6-promise.d.ts
(11,15): error TS2300: Duplicate identifier 'Promise'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/es6-promise/es6-promise.d.ts
(42,16): error TS2300: Duplicate identifier 'Promise'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/es6-collections/es6-collections.d.ts
(22,5): error TS2300: Duplicate identifier 'done'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/es6-collections/es6-collections.d.ts
(23,5): error TS2300: Duplicate identifier 'value'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/es6-collections/es6-collections.d.ts
(46,5): error TS2300: Duplicate identifier 'size'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/es6-collections/es6-collections.d.ts
(52,5): error TS2300: Duplicate identifier 'prototype'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/es6-collections/es6-collections.d.ts
(66,5): error TS2300: Duplicate identifier 'size'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/es6-collections/es6-collections.d.ts
(72,5): error TS2300: Duplicate identifier 'prototype'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/es6-collections/es6-collections.d.ts
(88,5): error TS2300: Duplicate identifier 'prototype'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/es6-collections/es6-collections.d.ts
(103,5): error TS2300: Duplicate identifier 'prototype'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/node_modules/angular2/typings/browser.d.ts
(6,14): error TS2300: Duplicate identifier 'PromiseConstructor'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(11,5): error TS2300: Duplicate identifier 'done'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(12,5): error TS2300: Duplicate identifier 'value'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(477,11): error TS2300: Duplicate identifier 'Promise'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(496,11): error TS2300: Duplicate identifier 'PromiseConstructor'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(554,13): error TS2300: Duplicate identifier 'Promise'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(563,5): error TS2300: Duplicate identifier 'size'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(572,5): error TS2300: Duplicate identifier 'prototype'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(583,5): error TS2300: Duplicate identifier 'size'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(592,5): error TS2300: Duplicate identifier 'prototype'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(607,5): error TS2300: Duplicate identifier 'prototype'.

ERROR in /Users/marcin/projects/ng2-webpack-lion/typings/browser/ambient/es6-shim/index.d.ts
(621,5): error TS2300: Duplicate identifier 'prototype'.

ERROR in ./~/zone.js/lib/browser/zone-microtask.ts
Module parse failed: /Users/marcin/projects/ng2-webpack-lion/node_modules/zone.js/lib/browser/zone-microtask.ts Line 3: Unexpected token
You may need an appropriate loader to handle this file type.
| 'use strict';
|
| import * as microtask from '../microtask';
| import * as es6Promise from 'es6-promise';
| import * as core from '../core';
@ ./app/vendor.ts 4:0-45

Seems like none of the known workarounds do the job.

Issue 2:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When the user enters a non numeric string in a input having the NumberValueAccessor directive , the value of the ng control is null.

Expected behavior

The value of a ng control attached to an input having the NumberValueAccessor directive should be :

a javascript number when the user entered a string representing a number

null if the user has not entered anything

NaN if the user entered a string that not represents a number

The first two cases are just, but the latter is false. In the latter two cases the value is always null.

Reproduction of the problem

The NumberValueAccessor being associated with a selector like input[type=number], simply declare a such input.

<input type="number" [(ngModel)]="model.intValue" />

Then get the value of the ng control after have entered a non numeric string in the input.

What is the motivation / use case for changing the behavior?

We need to distinguish between a lack of input and an input error. A lack of input can be valid if the field is optional, while a input error should be notified to the user to allow him to correct its input.

Please tell us about your environment:

Windows 7, Visual Studio 2015, Npm

Angular version: 2.0.0-rc.X

Browser: Firefox 48, but surely all browsers

Language: TypeScript 2.0