Issue 1:
[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

I'm in the process of incrementally upgrading an ng1 app to ng2. I'm getting this error when I try and use a downgraded service

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { GlobalVariables } from './global/config/variables';

@NgModule({
imports: [ BrowserModule ],
declarations: [ ],
bootstrap: [ ],
providers: [ GlobalVariables ],
})

export class AppModule { }

entry.ts

import '../styles/fonts/circular-black.css';
import '../styles/fonts/circular-book.css';
import '../styles/fonts/din-bold.css';
import '../styles/fonts/din-regular.css';
import '../styles/fonts/futura-medium.css';
import '../styles/styles.css';
import '../styles/themes.css';

import './app';
import './lb-services.js';

import './global/config/variables';
import './global/config/router-config';
import './global/config/theme-config';
import './global/components/browser-frame';
import './global/components/login';
import './global/components/scenario-login';
import './global/components/scenarios';
import './global/directives/demo-popup';
import './global/directives/pdf-popup';
import './global/services/auth';
import './global/services/awaiting-response';
import './global/services/clients';
import './global/services/transactions';
import './global/services/transfers';

import './banking-module/index-component';
import './banking-module/account-total';
import './banking-module/dashboard';
import './banking-module/payee';
import './banking-module/transaction';
import './banking-module/transactions';
import './banking-module/transfer';
import './banking-module/transfer-confirm';

import './compliance-module/index-component';
import './compliance-module/dashboard';
import './compliance-module/history';
import './compliance-module/transfer';
import './compliance-module/transfers';

import './token-module/token-inspector';
import './token-module/token-inspector-redux';
import './token-module/tokens-service';

// Must be after all the requirements for the app.ts
import './upgrade-adapter';

upgrade-adapter.ts

import { UpgradeAdapter } from '@angular/upgrade';
import { AppModule } from './app.module';
import { GlobalVariables } from './global/config/variables';

let adapter = new UpgradeAdapter(AppModule);
angular
.module('app')
.service('globalVars', adapter.downgradeNg2Provider(GlobalVariables));

adapter.bootstrap(document.documentElement, ['app']);

global/config/variables.ts

import { Injectable } from '@angular/core';

@Injectable()

export class GlobalVariables
{
currentUser:any
ROLES = {
COMPLIANCE:'compliance',
CONSUMER:'consumer'
}
BANKS = {
REMITTER:{
name: 'Thai Bank',
key: 'alpha',
realm: 'alpha-business'
},
RECEIVER:{
name: 'American Mutual',
key: 'beta',
realm: 'beta-business'
}
}
CUSTOMERS = {
REMITTER: {
accountName: 'Armstrong Pty Ltd',
postalAddress: '1031 Ploenchit road, Pathumwan, 10330 Central Embassy, Lumphini, Pathum Wan',
postcode: 'Bangkok 10330',
country: 'Thailand',
realm: 'alpha-client'
},
RECEIVER: {
accountName: 'USASolar LLC',
postalAddress: 'One Times Square, New York',
postcode: 'NY 10036',
country: 'United States',
realm: 'beta-client'
}
}
themes = [
{scenario:'Originator Client',
logo: null,
webAddress: 'www.thai-bank.com',
displayEmail: 'jhon-doe@hotmail.com',
realm: this.CUSTOMERS.REMITTER.realm,
tabTitle: this.BANKS.REMITTER.name+' - Online',
institution: this.BANKS.REMITTER.name,
name: this.BANKS.REMITTER.key,
role: this.ROLES.CONSUMER},
{scenario:'Originator Operator',
logo: null,
webAddress: 'compliance.thai-bank.com',
displayEmail: 'nancy@thai-bank.com',
realm: this.BANKS.REMITTER.realm,
tabTitle: this.BANKS.REMITTER.name+' - Compliance',
institution: this.BANKS.REMITTER.name,
name: this.BANKS.REMITTER.key,
role: this.ROLES.COMPLIANCE},
{scenario:'Beneficiary Operator',
logo: 'noun_123964_cc',
webAddress: 'compliance.american-mutual.com',
displayEmail: 'jimmy@american-mutual.com',
realm: this.BANKS.RECEIVER.realm,
tabTitle: this.BANKS.RECEIVER.name+' - Compliance',
institution: this.BANKS.RECEIVER.name,
name: this.BANKS.RECEIVER.key,
role: this.ROLES.COMPLIANCE},
{scenario:'Beneficiary Client',
logo: 'noun_123964_cc',
webAddress: 'www.american-mutual.com',
displayEmail: 'thomas-eliot@usa-solar.com',
realm: this.CUSTOMERS.RECEIVER.realm,
tabTitle: this.BANKS.RECEIVER.name+' - Online',
institution: this.BANKS.RECEIVER.name,
name: this.BANKS.RECEIVER.key,
role: this.ROLES.CONSUMER}
]
theming = {
themes:this.themes,
current:null
}
setCurrentTheme:(theme:any)=>void
constructor(private window: Window){
function sessionCacheSet(key:string, object:any){
window.sessionStorage.setItem(key, angular.toJson(object));
}

function sessionCacheGet(key:string, defVal:any){
try {
return angular.fromJson(window.sessionStorage.getItem(key));
}
catch(e){
return defVal;
}
}

this.theming.current = sessionCacheGet('current-theme', this.themes[0]);
this.setCurrentTheme = (theme) => {
this.theming.current = theme;
}
}
}

import { UpgradeAdapter } from '@angular/upgrade';
import { AppModule } from '../../app.module';

let adapter = new UpgradeAdapter(AppModule);

angular
.module('app')
.service('globalVars', adapter.downgradeNg2Provider(GlobalVariables));

package.json

{
"name": "client",
"version": "1.0.0",
"main": "ts/app.ts",
"scripts": {},
"dependencies": {
"angular": "^1.5.8",
"angular-animate": "^1.5.8",
"angular-aria": "^1.5.8",
"angular-cookies": "^1.5.8",
"angular-google-analytics": "^1.1.7",
"angular-material": "^1.1.1",
"angular-material-data-table": "^0.10.9",
"angular-md5": "^0.1.10",
"angular-messages": "^1.5.8",
"angular-resource": "^1.5.8",
"angular-sanitize": "^1.5.8",
"angular-timeline": "^1.7.0",
"angular-ui-router": "^1.0.0-beta.2",
"bootstrap": "^3.3.7",
"jquery": "^3.1.0",
"ng-redux": "^3.4.0-beta.1",

"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.27",
"zone.js": "^0.6.21",
"angular2-in-memory-web-api": "0.0.20"
},
"devDependencies": {
"angular-mocks": "^1.5.8",
"css-loader": "^0.25.0",
"css-raw-loader": "^0.1.1",
"expose-loader": "^0.7.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"html-loader": "^0.4.4",
"html-webpack-plugin": "^2.22.0",
"node-sass": "^3.9.3",
"null-loader": "^0.1.1",
"raw-loader": "^0.5.1",
"sass-loader": "^4.0.2",
"style-loader": "^0.13.1",
"ts-loader": "^0.8.2",
"tsc": "^1.20150623.0",
"typescript": "^1.8.10",
"webpack": "^1.13.2"
},
"repository": {
"type": "",
"url": ""
},
"license": "UNLICENSED",
"description": "Client app"
}

Expected behavior

I would expect the app upgradeAdapter to handle this type of service, it's very simple and has only window as a dependency

Reproduction of the problem

Simply trying to bootstrap a ng1/ng2 hybrid app

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

n/a

Please tell us about your environment:

OSX, Visual Studio Code, Webpack, node express

Angular version: 2.0.0

Browser: [ Chrome ]

Language: [TypeScript 1.8.10]

tsconfig

{
"compileOnSave": false,
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true,
"outDir": "../www/js",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"suppressImplicitAnyIndexErrors": true
}
}

Node (for AoT issues): node --version = v4.4.7

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

[ ] bug report => search github for a similar issue or PR before submitting
[x] 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

Unless I am missing something obvious, it seems like the i18n tool assumes that you are extracting a single i18n file for the entire application.

My experience is that this is not an ideal workflow for large multi-team applications. Maintaining a shared file doesn't seem like it will scale.

Desired behavior

It would be very helpful if the tool allowed us to extract the translations into multiple, smaller files that could be pieced together later.

e.g.

Allow Team A and Team B to maintain separate files, specific to feature A and Feature B

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

Making it easier for multiple teams to work on larger apps.