repackaging: all the repackaging changes squashed
This commit is contained in:
parent
505da6c0a8
commit
a66cdb469f
|
@ -52,3 +52,6 @@ npm-debug.log
|
||||||
|
|
||||||
# built dart payload tests
|
# built dart payload tests
|
||||||
/modules_dart/payload/**/build
|
/modules_dart/payload/**/build
|
||||||
|
|
||||||
|
# rollup-test output
|
||||||
|
/modules/rollup-test/dist/
|
||||||
|
|
270
.travis.yml
270
.travis.yml
|
@ -3,132 +3,190 @@ sudo: false
|
||||||
node_js:
|
node_js:
|
||||||
- '5.4.1'
|
- '5.4.1'
|
||||||
|
|
||||||
|
addons:
|
||||||
|
# firefox: "38.0"
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
# needed to install g++ that is used by npms's native modules
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- g++-4.8
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
- g3_v2_0
|
- g3_v2_0
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.pub-cache
|
- ./node_modules
|
||||||
- $HOME/.chrome/chromium
|
- ./.chrome/chromium
|
||||||
|
# - $HOME/.pub-cache
|
||||||
|
|
||||||
before_cache:
|
|
||||||
# Undo the pollution of the typescript_next build before the cache is primed for future use
|
#before_cache:
|
||||||
- if [[ "$MODE" == "typescript_next" ]]; then npm install typescript; fi
|
# # Undo the pollution of the typescript_next build before the cache is primed for future use
|
||||||
|
# - if [[ "$MODE" == "typescript_next" ]]; then npm install typescript; fi
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
# Use newer verison of GCC to that is required to compile native npm modules for Node v4+ on Ubuntu Precise
|
# - KARMA_JS_BROWSERS=ChromeNoSandbox
|
||||||
# more info: https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-(or-io.js-v3)-compiler-requirements
|
# - E2E_BROWSERS=ChromeOnTravis
|
||||||
- CXX=g++-4.8
|
# - LOGS_DIR=/tmp/angular-build/logs
|
||||||
- KARMA_DART_BROWSERS=DartiumWithWebPlatform
|
# - ARCH=linux-x64
|
||||||
# No sandbox mode is needed for Chromium in Travis, it crashes otherwise: https://sites.google.com/a/chromium.org/chromedriver/help/chrome-doesn-t-start
|
|
||||||
- KARMA_JS_BROWSERS=ChromeNoSandbox
|
|
||||||
- E2E_BROWSERS=ChromeOnTravis
|
|
||||||
- LOGS_DIR=/tmp/angular-build/logs
|
|
||||||
- SAUCE_USERNAME=angular-ci
|
|
||||||
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
|
|
||||||
- BROWSER_STACK_USERNAME=angularteam1
|
|
||||||
- BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
|
|
||||||
- ARCH=linux-x64
|
|
||||||
- DART_DEV_VERSION=latest
|
|
||||||
- DART_STABLE_VERSION=latest
|
|
||||||
- DART_CHANNEL=stable
|
|
||||||
- DART_VERSION=$DART_STABLE_VERSION
|
|
||||||
# Token for tsd to increase github rate limit
|
|
||||||
# See https://github.com/DefinitelyTyped/tsd#tsdrc
|
|
||||||
# This does not use http://docs.travis-ci.com/user/environment-variables/#Secure-Variables
|
|
||||||
# because those are not visible for pull requests, and those should also be reliable.
|
|
||||||
# This SSO token belongs to github account angular-github-ratelimit-token which has no access
|
|
||||||
# (password is in Valentine)
|
|
||||||
- TSDRC='{"token":"ef474500309daea53d5991b3079159a29520a40b"}'
|
|
||||||
# GITHUB_TOKEN_ANGULAR
|
|
||||||
- secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
|
|
||||||
matrix:
|
matrix:
|
||||||
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
|
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
|
||||||
- MODE=dart
|
- CI_MODE=js
|
||||||
- MODE=dart DART_CHANNEL=dev
|
# - CI_MODE=dart
|
||||||
- MODE=saucelabs_required
|
- CI_MODE=build_only
|
||||||
- MODE=browserstack_required
|
- CI_MODE=saucelabs_required
|
||||||
- MODE=saucelabs_optional
|
- CI_MODE=browserstack_required
|
||||||
- MODE=browserstack_optional
|
|
||||||
- MODE=dart_ddc
|
|
||||||
- MODE=js
|
|
||||||
- MODE=router
|
|
||||||
- MODE=build_only
|
|
||||||
- MODE=typescript_next
|
|
||||||
- MODE=lint
|
|
||||||
|
|
||||||
matrix:
|
#matrix:
|
||||||
allow_failures:
|
# allow_failures:
|
||||||
- env: "MODE=saucelabs_optional"
|
# - env: "MODE=saucelabs_optional"
|
||||||
- env: "MODE=browserstack_optional"
|
# - env: "MODE=browserstack_optional"
|
||||||
|
|
||||||
addons:
|
|
||||||
firefox: "38.0"
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
|
||||||
- g++-4.8
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- node tools/analytics/build-analytics start ci job
|
|
||||||
- node tools/analytics/build-analytics start ci before_install
|
|
||||||
- echo ${TSDRC} > .tsdrc
|
|
||||||
- export CHROME_BIN=$HOME/.chrome/chromium/chrome-linux/chrome
|
|
||||||
- export DISPLAY=:99.0
|
|
||||||
- export GIT_SHA=$(git rev-parse HEAD)
|
|
||||||
- ./scripts/ci/init_android.sh
|
|
||||||
- sh -e /etc/init.d/xvfb start
|
|
||||||
# Use a separate SauseLabs account for upstream/master builds in order for Sauce to create a badge representing the status of just upstream/master
|
|
||||||
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && SAUCE_USERNAME="angular2-ci" && SAUCE_ACCESS_KEY="693ebc16208a-0b5b-1614-8d66-a2662f4e" || true'
|
|
||||||
- node tools/analytics/build-analytics success ci before_install
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- node tools/analytics/build-analytics start ci install
|
- ./scripts/ci-lite/install.sh
|
||||||
# Install version of npm that we are locked against
|
|
||||||
- npm install -g npm@3.5.3
|
|
||||||
# Install version of Chromium that we are locked against
|
|
||||||
- ./scripts/ci/install_chromium.sh
|
|
||||||
# Install version of Dart based on the matrix build variables
|
|
||||||
- ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${DART_VERSION} ${ARCH}
|
|
||||||
# Print the size of caches to ease debugging
|
|
||||||
- du -sh ./node_modules || true
|
|
||||||
# Install npm dependecies
|
|
||||||
# check-node-modules will exit(1) if we don't need to install
|
|
||||||
# we need to manually kick off the postinstall script if check-node-modules exit(0)s
|
|
||||||
- node tools/npm/check-node-modules --purge && npm install || npm run postinstall
|
|
||||||
- node tools/analytics/build-analytics success ci install
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- node tools/analytics/build-analytics start ci before_script
|
|
||||||
- mkdir -p $LOGS_DIR
|
|
||||||
- ./scripts/ci/presubmit-queue-setup.sh
|
|
||||||
- node tools/analytics/build-analytics success ci before_script
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- node tools/analytics/build-analytics start ci script
|
- ./scripts/ci-lite/build.sh && ./scripts/ci-lite/test.sh
|
||||||
- ./scripts/ci/build_and_test.sh ${MODE}
|
|
||||||
- node tools/analytics/build-analytics success ci script
|
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- node tools/analytics/build-analytics start ci after_script
|
- ./scripts/ci-lite/cleanup.sh
|
||||||
- ./scripts/ci/print-logs.sh
|
|
||||||
- ./scripts/ci/after-script.sh
|
|
||||||
- ./scripts/publish/publish-build-artifacts.sh
|
|
||||||
- node tools/analytics/build-analytics success ci after_script
|
|
||||||
- tools/analytics/build-analytics $TRAVIS_TEST_RESULT ci job
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
webhooks:
|
#branches:
|
||||||
urls:
|
# except:
|
||||||
- https://webhooks.gitter.im/e/1ef62e23078036f9cee4
|
# - g3_v2_0
|
||||||
# trigger Buildtime Trend Service to parse Travis CI log
|
#
|
||||||
- https://buildtimetrend.herokuapp.com/travis
|
#cache:
|
||||||
- http://104.197.9.155:8484/hubot/travis/activity
|
# directories:
|
||||||
on_success: always # options: [always|never|change] default: always
|
# - $HOME/.pub-cache
|
||||||
on_failure: always # options: [always|never|change] default: always
|
# - $HOME/.chrome/chromium
|
||||||
on_start: never # default: never
|
#
|
||||||
slack:
|
#before_cache:
|
||||||
secure: EP4MzZ8JMyNQJ4S3cd5LEPWSMjC7ZRdzt3veelDiOeorJ6GwZfCDHncR+4BahDzQAuqyE/yNpZqaLbwRWloDi15qIUsm09vgl/1IyNky1Sqc6lEknhzIXpWSalo4/T9ZP8w870EoDvM/UO+LCV99R3wS8Nm9o99eLoWVb2HIUu0=
|
# # Undo the pollution of the typescript_next build before the cache is primed for future use
|
||||||
|
# - if [[ "$MODE" == "typescript_next" ]]; then npm install typescript; fi
|
||||||
|
#
|
||||||
|
#env:
|
||||||
|
# global:
|
||||||
|
# # Use newer verison of GCC to that is required to compile native npm modules for Node v4+ on Ubuntu Precise
|
||||||
|
# # more info: https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-(or-io.js-v3)-compiler-requirements
|
||||||
|
# - CXX=g++-4.8
|
||||||
|
# - KARMA_DART_BROWSERS=DartiumWithWebPlatform
|
||||||
|
# # No sandbox mode is needed for Chromium in Travis, it crashes otherwise: https://sites.google.com/a/chromium.org/chromedriver/help/chrome-doesn-t-start
|
||||||
|
# - KARMA_JS_BROWSERS=ChromeNoSandbox
|
||||||
|
# - E2E_BROWSERS=ChromeOnTravis
|
||||||
|
# - LOGS_DIR=/tmp/angular-build/logs
|
||||||
|
# - SAUCE_USERNAME=angular-ci
|
||||||
|
# - SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
|
||||||
|
# - BROWSER_STACK_USERNAME=angularteam1
|
||||||
|
# - BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
|
||||||
|
# - ARCH=linux-x64
|
||||||
|
# - DART_DEV_VERSION=latest
|
||||||
|
# - DART_STABLE_VERSION=latest
|
||||||
|
# - DART_CHANNEL=stable
|
||||||
|
# - DART_VERSION=$DART_STABLE_VERSION
|
||||||
|
# # Token for tsd to increase github rate limit
|
||||||
|
# # See https://github.com/DefinitelyTyped/tsd#tsdrc
|
||||||
|
# # This does not use http://docs.travis-ci.com/user/environment-variables/#Secure-Variables
|
||||||
|
# # because those are not visible for pull requests, and those should also be reliable.
|
||||||
|
# # This SSO token belongs to github account angular-github-ratelimit-token which has no access
|
||||||
|
# # (password is in Valentine)
|
||||||
|
# - TSDRC='{"token":"ef474500309daea53d5991b3079159a29520a40b"}'
|
||||||
|
# # GITHUB_TOKEN_ANGULAR
|
||||||
|
# - secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
|
||||||
|
# matrix:
|
||||||
|
# # Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
|
||||||
|
# - MODE=dart
|
||||||
|
# - MODE=dart DART_CHANNEL=dev
|
||||||
|
# - MODE=saucelabs_required
|
||||||
|
# - MODE=browserstack_required
|
||||||
|
# - MODE=saucelabs_optional
|
||||||
|
# - MODE=browserstack_optional
|
||||||
|
# - MODE=dart_ddc
|
||||||
|
# - MODE=js
|
||||||
|
# - MODE=router
|
||||||
|
# - MODE=build_only
|
||||||
|
# - MODE=typescript_next
|
||||||
|
# - MODE=lint
|
||||||
|
#
|
||||||
|
#matrix:
|
||||||
|
# allow_failures:
|
||||||
|
# - env: "MODE=saucelabs_optional"
|
||||||
|
# - env: "MODE=browserstack_optional"
|
||||||
|
#
|
||||||
|
#addons:
|
||||||
|
# firefox: "38.0"
|
||||||
|
# apt:
|
||||||
|
# sources:
|
||||||
|
# - ubuntu-toolchain-r-test
|
||||||
|
# packages:
|
||||||
|
# - g++-4.8
|
||||||
|
#
|
||||||
|
#before_install:
|
||||||
|
# - node tools/analytics/build-analytics start ci job
|
||||||
|
# - node tools/analytics/build-analytics start ci before_install
|
||||||
|
# - echo ${TSDRC} > .tsdrc
|
||||||
|
# - export CHROME_BIN=$HOME/.chrome/chromium/chrome-linux/chrome
|
||||||
|
# - export DISPLAY=:99.0
|
||||||
|
# - export GIT_SHA=$(git rev-parse HEAD)
|
||||||
|
# - ./scripts/ci/init_android.sh
|
||||||
|
# - sh -e /etc/init.d/xvfb start
|
||||||
|
# # Use a separate SauseLabs account for upstream/master builds in order for Sauce to create a badge representing the status of just upstream/master
|
||||||
|
# - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && SAUCE_USERNAME="angular2-ci" && SAUCE_ACCESS_KEY="693ebc16208a-0b5b-1614-8d66-a2662f4e" || true'
|
||||||
|
# - node tools/analytics/build-analytics success ci before_install
|
||||||
|
#
|
||||||
|
#install:
|
||||||
|
# - node tools/analytics/build-analytics start ci install
|
||||||
|
# # Install version of npm that we are locked against
|
||||||
|
# - npm install -g npm@3.5.3
|
||||||
|
# # Install version of Chromium that we are locked against
|
||||||
|
# - ./scripts/ci/install_chromium.sh
|
||||||
|
# # Install version of Dart based on the matrix build variables
|
||||||
|
# - ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${DART_VERSION} ${ARCH}
|
||||||
|
# # Print the size of caches to ease debugging
|
||||||
|
# - du -sh ./node_modules || true
|
||||||
|
# # Install npm dependecies
|
||||||
|
# # check-node-modules will exit(1) if we don't need to install
|
||||||
|
# # we need to manually kick off the postinstall script if check-node-modules exit(0)s
|
||||||
|
# - node tools/npm/check-node-modules --purge && npm install || npm run postinstall
|
||||||
|
# - node tools/analytics/build-analytics success ci install
|
||||||
|
#
|
||||||
|
#before_script:
|
||||||
|
# - node tools/analytics/build-analytics start ci before_script
|
||||||
|
# - mkdir -p $LOGS_DIR
|
||||||
|
# - ./scripts/ci/presubmit-queue-setup.sh
|
||||||
|
# - node tools/analytics/build-analytics success ci before_script
|
||||||
|
#
|
||||||
|
#script:
|
||||||
|
# - node tools/analytics/build-analytics start ci script
|
||||||
|
# - ./scripts/ci/build_and_test.sh ${MODE}
|
||||||
|
# - node tools/analytics/build-analytics success ci script
|
||||||
|
#
|
||||||
|
#after_script:
|
||||||
|
# - node tools/analytics/build-analytics start ci after_script
|
||||||
|
# - ./scripts/ci/print-logs.sh
|
||||||
|
# - ./scripts/ci/after-script.sh
|
||||||
|
# - ./scripts/publish/publish-build-artifacts.sh
|
||||||
|
# - node tools/analytics/build-analytics success ci after_script
|
||||||
|
# - tools/analytics/build-analytics $TRAVIS_TEST_RESULT ci job
|
||||||
|
#
|
||||||
|
#notifications:
|
||||||
|
# webhooks:
|
||||||
|
# urls:
|
||||||
|
# - https://webhooks.gitter.im/e/1ef62e23078036f9cee4
|
||||||
|
# # trigger Buildtime Trend Service to parse Travis CI log
|
||||||
|
# - https://buildtimetrend.herokuapp.com/travis
|
||||||
|
# - http://104.197.9.155:8484/hubot/travis/activity
|
||||||
|
# on_success: always # options: [always|never|change] default: always
|
||||||
|
# on_failure: always # options: [always|never|change] default: always
|
||||||
|
# on_start: never # default: never
|
||||||
|
# slack:
|
||||||
|
# secure: EP4MzZ8JMyNQJ4S3cd5LEPWSMjC7ZRdzt3veelDiOeorJ6GwZfCDHncR+4BahDzQAuqyE/yNpZqaLbwRWloDi15qIUsm09vgl/1IyNky1Sqc6lEknhzIXpWSalo4/T9ZP8w870EoDvM/UO+LCV99R3wS8Nm9o99eLoWVb2HIUu0=
|
||||||
|
|
|
@ -38,7 +38,7 @@ var customLaunchers = {
|
||||||
'SL_CHROME': {
|
'SL_CHROME': {
|
||||||
base: 'SauceLabs',
|
base: 'SauceLabs',
|
||||||
browserName: 'chrome',
|
browserName: 'chrome',
|
||||||
version: '46'
|
version: '50'
|
||||||
},
|
},
|
||||||
'SL_CHROMEBETA': {
|
'SL_CHROMEBETA': {
|
||||||
base: 'SauceLabs',
|
base: 'SauceLabs',
|
||||||
|
@ -53,7 +53,7 @@ var customLaunchers = {
|
||||||
'SL_FIREFOX': {
|
'SL_FIREFOX': {
|
||||||
base: 'SauceLabs',
|
base: 'SauceLabs',
|
||||||
browserName: 'firefox',
|
browserName: 'firefox',
|
||||||
version: '42'
|
version: '45'
|
||||||
},
|
},
|
||||||
'SL_FIREFOXBETA': {
|
'SL_FIREFOXBETA': {
|
||||||
base: 'SauceLabs',
|
base: 'SauceLabs',
|
||||||
|
@ -299,12 +299,7 @@ module.exports = {
|
||||||
customLaunchers: customLaunchers,
|
customLaunchers: customLaunchers,
|
||||||
sauceAliases: sauceAliases,
|
sauceAliases: sauceAliases,
|
||||||
browserstackAliases: browserstackAliases
|
browserstackAliases: browserstackAliases
|
||||||
}
|
};
|
||||||
|
|
||||||
if (process.env.TRAVIS) {
|
|
||||||
process.env.SAUCE_ACCESS_KEY = process.env.SAUCE_ACCESS_KEY.split('').reverse().join('');
|
|
||||||
process.env.BROWSER_STACK_ACCESS_KEY = process.env.BROWSER_STACK_ACCESS_KEY.split('').reverse().join('');
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildConfiguration(type, target, required) {
|
function buildConfiguration(type, target, required) {
|
||||||
return Object.keys(CIconfiguration)
|
return Object.keys(CIconfiguration)
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e -o pipefail
|
||||||
|
|
||||||
|
cd `dirname $0`
|
||||||
|
|
||||||
|
|
||||||
|
TSCONFIG=./modules/tsconfig.json
|
||||||
|
echo "====== (all)COMPILING: \$(npm bin)/tsc -p ${TSCONFIG} ====="
|
||||||
|
rm -rf ./dist/all/
|
||||||
|
$(npm bin)/tsc -p ${TSCONFIG}
|
||||||
|
|
||||||
|
|
||||||
|
rm -rf ./dist/packages-dist
|
||||||
|
|
||||||
|
for PACKAGE in \
|
||||||
|
core \
|
||||||
|
compiler \
|
||||||
|
common \
|
||||||
|
platform-browser \
|
||||||
|
platform-browser-dynamic \
|
||||||
|
platform-server \
|
||||||
|
http \
|
||||||
|
router \
|
||||||
|
upgrade
|
||||||
|
do
|
||||||
|
SRCDIR=./modules/@angular/${PACKAGE}
|
||||||
|
DESTDIR=./dist/packages-dist/${PACKAGE}
|
||||||
|
UMDES6PATH=${DESTDIR}/esm/${PACKAGE}.umd.js
|
||||||
|
UMDES5PATH=${DESTDIR}/${PACKAGE}.umd.js
|
||||||
|
|
||||||
|
|
||||||
|
echo "====== COMPILING: \$(npm bin)/tsc -p ${SRCDIR}/tsconfig.json ====="
|
||||||
|
$(npm bin)/tsc -p ${SRCDIR}/tsconfig.json
|
||||||
|
cp ${SRCDIR}/package.json ${DESTDIR}/
|
||||||
|
|
||||||
|
|
||||||
|
echo "====== TSC 1.8 d.ts compat for ${DESTDIR} ====="
|
||||||
|
# safely strips 'readonly' specifier from d.ts files to make them compatible with tsc 1.8
|
||||||
|
if [[ ${TRAVIS} ]]; then
|
||||||
|
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i -e 's/\(^ *(static |private )*\)*readonly */\1/g'
|
||||||
|
else
|
||||||
|
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i '' -e 's/\(^ *(static |private )*\)*readonly */\1/g'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "====== (esm)COMPILING: \$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json ====="
|
||||||
|
$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json
|
||||||
|
|
||||||
|
|
||||||
|
echo "====== BUNDLING: ${SRCDIR} ====="
|
||||||
|
(
|
||||||
|
cd ${SRCDIR}
|
||||||
|
echo "..." # here just to have grep match something and not exit with 1
|
||||||
|
../../../node_modules/.bin/rollup -c rollup.config.js
|
||||||
|
) 2>&1 | grep -v "as external dependency"
|
||||||
|
|
||||||
|
# workaround for https://github.com/rollup/rollup/issues/626
|
||||||
|
if [[ ${TRAVIS} ]]; then
|
||||||
|
sed -i "s/ class exports\./ class /g" ${DESTDIR}/esm/${PACKAGE}.umd.js
|
||||||
|
else
|
||||||
|
sed -i '' "s/ class exports\./ class /g" ${DESTDIR}/esm/${PACKAGE}.umd.js
|
||||||
|
fi
|
||||||
|
|
||||||
|
$(npm bin)/tsc \
|
||||||
|
--out ${UMDES5PATH} \
|
||||||
|
--target es5 \
|
||||||
|
--allowJs \
|
||||||
|
${UMDES6PATH} \
|
||||||
|
modules/\@angular/manual_typings/globals.d.ts \
|
||||||
|
modules/\@angular/typings/es6-collections/es6-collections.d.ts \
|
||||||
|
modules/\@angular/typings/es6-promise/es6-promise.d.ts
|
||||||
|
rm ${UMDES6PATH}
|
||||||
|
|
||||||
|
done
|
|
@ -923,7 +923,7 @@ gulp.task('test.unit.cjs/ci', function(done) {
|
||||||
runJasmineTests(['dist/js/cjs/{angular2,benchpress}/test/**/*_spec.js'], done);
|
runJasmineTests(['dist/js/cjs/{angular2,benchpress}/test/**/*_spec.js'], done);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('check-public-api',
|
gulp.task('check-public-api', ['build.tools'],
|
||||||
function(done) { runJasmineTests(['dist/tools/public_api_guard/**/*_spec.js'], done); });
|
function(done) { runJasmineTests(['dist/tools/public_api_guard/**/*_spec.js'], done); });
|
||||||
|
|
||||||
gulp.task('test.unit.cjs', ['build/clean.js', 'build.tools'], function(neverDone) {
|
gulp.task('test.unit.cjs', ['build/clean.js', 'build.tools'], function(neverDone) {
|
||||||
|
@ -1566,6 +1566,10 @@ process.on('beforeExit', function() {
|
||||||
|
|
||||||
|
|
||||||
var firstTask = true;
|
var firstTask = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gulp.on('task_start', (e) => {
|
gulp.on('task_start', (e) => {
|
||||||
if (firstTask) {
|
if (firstTask) {
|
||||||
firstTask = false;
|
firstTask = false;
|
||||||
|
|
|
@ -11,7 +11,8 @@ module.exports = function(config) {
|
||||||
files: [
|
files: [
|
||||||
// Sources and specs.
|
// Sources and specs.
|
||||||
// Loaded through the System loader, in `test-main.js`.
|
// Loaded through the System loader, in `test-main.js`.
|
||||||
{pattern: 'dist/js/dev/es5/**', included: false, watched: false},
|
{pattern: 'dist/all/@angular/**/*.js', included: false, watched: true},
|
||||||
|
{pattern: 'dist/all/angular2/**/*.js', included: false, watched: true},
|
||||||
|
|
||||||
'node_modules/es6-shim/es6-shim.js',
|
'node_modules/es6-shim/es6-shim.js',
|
||||||
// include Angular v1 for upgrade module testing
|
// include Angular v1 for upgrade module testing
|
||||||
|
@ -24,16 +25,23 @@ module.exports = function(config) {
|
||||||
'node_modules/zone.js/dist/fake-async-test.js',
|
'node_modules/zone.js/dist/fake-async-test.js',
|
||||||
|
|
||||||
// Including systemjs because it defines `__eval`, which produces correct stack traces.
|
// Including systemjs because it defines `__eval`, which produces correct stack traces.
|
||||||
'modules/angular2/src/testing/shims_for_IE.js',
|
'shims_for_IE.js',
|
||||||
'node_modules/systemjs/dist/system.src.js',
|
'node_modules/systemjs/dist/system.src.js',
|
||||||
{pattern: 'node_modules/rxjs/**', included: false, watched: false, served: true},
|
{pattern: 'node_modules/rxjs/**', included: false, watched: false, served: true},
|
||||||
'node_modules/reflect-metadata/Reflect.js',
|
'node_modules/reflect-metadata/Reflect.js',
|
||||||
'tools/build/file2modulename.js',
|
'tools/build/file2modulename.js',
|
||||||
'test-main.js',
|
'test-main.js',
|
||||||
{pattern: 'modules/**/test/**/static_assets/**', included: false, watched: false}
|
{pattern: 'dist/all/empty.*', included: false, watched: false},
|
||||||
|
{pattern: 'modules/@angular/platform-browser/test/static_assets/**', included: false, watched: false},
|
||||||
|
{pattern: 'modules/@angular/platform-browser-dynamic/test/browser/static_assets/**', included: false, watched: false}
|
||||||
],
|
],
|
||||||
|
|
||||||
exclude: ['dist/js/dev/es5/**/e2e_test/**', 'dist/js/dev/es5/angular2/examples/**', 'dist/angular1_router.js'],
|
exclude: [
|
||||||
|
'dist/all/@angular/**/e2e_test/**',
|
||||||
|
'dist/all/@angular/examples/**',
|
||||||
|
'dist/all/angular1_router.js',
|
||||||
|
'dist/all/@angular/platform-browser/testing/e2e_util.js'
|
||||||
|
],
|
||||||
|
|
||||||
customLaunchers: browserProvidersConf.customLaunchers,
|
customLaunchers: browserProvidersConf.customLaunchers,
|
||||||
|
|
||||||
|
@ -54,6 +62,7 @@ module.exports = function(config) {
|
||||||
reporters: ['internal-angular'],
|
reporters: ['internal-angular'],
|
||||||
sauceLabs: {
|
sauceLabs: {
|
||||||
testName: 'Angular2',
|
testName: 'Angular2',
|
||||||
|
retryLimit: 3,
|
||||||
startConnect: false,
|
startConnect: false,
|
||||||
recordVideo: false,
|
recordVideo: false,
|
||||||
recordScreenshots: false,
|
recordScreenshots: false,
|
||||||
|
@ -68,7 +77,7 @@ module.exports = function(config) {
|
||||||
browserStack: {
|
browserStack: {
|
||||||
project: 'Angular2',
|
project: 'Angular2',
|
||||||
startTunnel: false,
|
startTunnel: false,
|
||||||
retryLimit: 1,
|
retryLimit: 3,
|
||||||
timeout: 600,
|
timeout: 600,
|
||||||
pollingTimeout: 10000
|
pollingTimeout: 10000
|
||||||
},
|
},
|
||||||
|
@ -80,7 +89,7 @@ module.exports = function(config) {
|
||||||
|
|
||||||
if (process.env.TRAVIS) {
|
if (process.env.TRAVIS) {
|
||||||
var buildId = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
|
var buildId = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
|
||||||
if (process.env.MODE.startsWith('saucelabs')) {
|
if (process.env.CI_MODE.startsWith('saucelabs')) {
|
||||||
config.sauceLabs.build = buildId;
|
config.sauceLabs.build = buildId;
|
||||||
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
|
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
|
||||||
|
|
||||||
|
@ -90,7 +99,7 @@ module.exports = function(config) {
|
||||||
config.transports = ['polling'];
|
config.transports = ['polling'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.MODE.startsWith('browserstack')) {
|
if (process.env.CI_MODE.startsWith('browserstack')) {
|
||||||
config.browserStack.build = buildId;
|
config.browserStack.build = buildId;
|
||||||
config.browserStack.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
|
config.browserStack.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
export 'index.dart';
|
|
@ -0,0 +1,6 @@
|
||||||
|
export * from './src/pipes';
|
||||||
|
export * from './src/directives';
|
||||||
|
export * from './src/forms';
|
||||||
|
export * from './src/common_directives';
|
||||||
|
export * from './src/location';
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"name": "@angular/common",
|
||||||
|
"version": "$$ANGULAR_VERSION$$",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"jsnext:main": "esm/index.js",
|
||||||
|
"typings": "index.d.ts",
|
||||||
|
"author": "angular",
|
||||||
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/core": "$$ANGULAR_VERSION$$"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
export default {
|
||||||
|
entry: '../../../dist/packages-dist/common/esm/index.js',
|
||||||
|
dest: '../../../dist/packages-dist/common/esm/common.umd.js',
|
||||||
|
sourceMap: true,
|
||||||
|
format: 'umd',
|
||||||
|
moduleName: 'ng.common',
|
||||||
|
globals: {
|
||||||
|
'@angular/core': 'ng.core',
|
||||||
|
'rxjs/Subject': 'Rx',
|
||||||
|
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
|
||||||
|
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
|
||||||
|
'rxjs/Observable': 'Rx'
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
// nodeResolve({ jsnext: true, main: true }),
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
import {Type} from 'angular2/src/facade/lang';
|
import {Type} from '@angular/core';
|
||||||
|
|
||||||
import {FORM_DIRECTIVES} from './forms';
|
import {FORM_DIRECTIVES} from './forms';
|
||||||
import {CORE_DIRECTIVES} from './directives';
|
import {CORE_DIRECTIVES} from './directives';
|
||||||
|
|
||||||
|
@ -17,7 +16,7 @@ import {CORE_DIRECTIVES} from './directives';
|
||||||
*
|
*
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, NgModel, NgForm} from
|
* import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, NgModel, NgForm} from
|
||||||
* 'angular2/common';
|
* '@angular/common';
|
||||||
* import {OtherDirective} from './myDirectives';
|
* import {OtherDirective} from './myDirectives';
|
||||||
*
|
*
|
||||||
* @Component({
|
* @Component({
|
||||||
|
@ -33,7 +32,7 @@ import {CORE_DIRECTIVES} from './directives';
|
||||||
* one could import all the common directives at once:
|
* one could import all the common directives at once:
|
||||||
*
|
*
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import {COMMON_DIRECTIVES} from 'angular2/common';
|
* import {COMMON_DIRECTIVES} from '@angular/common';
|
||||||
* import {OtherDirective} from './myDirectives';
|
* import {OtherDirective} from './myDirectives';
|
||||||
*
|
*
|
||||||
* @Component({
|
* @Component({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {Type} from 'angular2/src/facade/lang';
|
import {Type} from '../../src/facade/lang';
|
||||||
import {NgClass} from './ng_class';
|
import {NgClass} from './ng_class';
|
||||||
import {NgFor} from './ng_for';
|
import {NgFor} from './ng_for';
|
||||||
import {NgIf} from './ng_if';
|
import {NgIf} from './ng_if';
|
||||||
|
@ -19,7 +19,7 @@ import {NgPlural, NgPluralCase} from './ng_plural';
|
||||||
* Instead of writing:
|
* Instead of writing:
|
||||||
*
|
*
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/common';
|
* import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from '@angular/common';
|
||||||
* import {OtherDirective} from './myDirectives';
|
* import {OtherDirective} from './myDirectives';
|
||||||
*
|
*
|
||||||
* @Component({
|
* @Component({
|
||||||
|
@ -34,7 +34,7 @@ import {NgPlural, NgPluralCase} from './ng_plural';
|
||||||
* one could import all the core directives at once:
|
* one could import all the core directives at once:
|
||||||
*
|
*
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import {CORE_DIRECTIVES} from 'angular2/common';
|
* import {CORE_DIRECTIVES} from '@angular/common';
|
||||||
* import {OtherDirective} from './myDirectives';
|
* import {OtherDirective} from './myDirectives';
|
||||||
*
|
*
|
||||||
* @Component({
|
* @Component({
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import {isPresent, isString, isArray} from 'angular2/src/facade/lang';
|
|
||||||
import {
|
import {
|
||||||
DoCheck,
|
DoCheck,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
|
@ -11,8 +10,9 @@ import {
|
||||||
KeyValueDiffer,
|
KeyValueDiffer,
|
||||||
CollectionChangeRecord,
|
CollectionChangeRecord,
|
||||||
KeyValueChangeRecord
|
KeyValueChangeRecord
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
import {StringMapWrapper, isListLikeIterable} from 'angular2/src/facade/collection';
|
import {isPresent, isString, isArray} from '../../src/facade/lang';
|
||||||
|
import {StringMapWrapper, isListLikeIterable} from '../../src/facade/collection';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The `NgClass` directive conditionally adds and removes CSS classes on an HTML element based on
|
* The `NgClass` directive conditionally adds and removes CSS classes on an HTML element based on
|
||||||
|
@ -33,8 +33,8 @@ import {StringMapWrapper, isListLikeIterable} from 'angular2/src/facade/collecti
|
||||||
* ### Example ([live demo](http://plnkr.co/edit/a4YdtmWywhJ33uqfpPPn?p=preview)):
|
* ### Example ([live demo](http://plnkr.co/edit/a4YdtmWywhJ33uqfpPPn?p=preview)):
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* import {Component} from 'angular2/core';
|
* import {Component} from '@angular/core';
|
||||||
* import {NgClass} from 'angular2/common';
|
* import {NgClass} from '@angular/common';
|
||||||
*
|
*
|
||||||
* @Component({
|
* @Component({
|
||||||
* selector: 'toggle-button',
|
* selector: 'toggle-button',
|
||||||
|
|
|
@ -7,14 +7,12 @@ import {
|
||||||
ViewContainerRef,
|
ViewContainerRef,
|
||||||
TemplateRef,
|
TemplateRef,
|
||||||
EmbeddedViewRef,
|
EmbeddedViewRef,
|
||||||
TrackByFn
|
TrackByFn,
|
||||||
} from 'angular2/core';
|
|
||||||
import {isPresent, isBlank, stringify, getTypeNameForDebugging} from 'angular2/src/facade/lang';
|
|
||||||
import {
|
|
||||||
DefaultIterableDiffer,
|
DefaultIterableDiffer,
|
||||||
CollectionChangeRecord
|
CollectionChangeRecord
|
||||||
} from "../../core/change_detection/differs/default_iterable_differ";
|
} from '@angular/core';
|
||||||
import {BaseException} from "../../facade/exceptions";
|
import {isPresent, isBlank, getTypeNameForDebugging} from '../../src/facade/lang';
|
||||||
|
import {BaseException} from '../../src/facade/exceptions';
|
||||||
|
|
||||||
export class NgForRow {
|
export class NgForRow {
|
||||||
constructor(public $implicit: any, public index: number, public count: number) {}
|
constructor(public $implicit: any, public index: number, public count: number) {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {Directive, ViewContainerRef, TemplateRef} from 'angular2/core';
|
import {Directive, ViewContainerRef, TemplateRef} from '@angular/core';
|
||||||
import {isBlank} from 'angular2/src/facade/lang';
|
import {isBlank} from '../../src/facade/lang';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes or recreates a portion of the DOM tree based on an {expression}.
|
* Removes or recreates a portion of the DOM tree based on an {expression}.
|
||||||
|
|
|
@ -7,9 +7,10 @@ import {
|
||||||
Attribute,
|
Attribute,
|
||||||
AfterContentInit,
|
AfterContentInit,
|
||||||
Input
|
Input
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
import {isPresent, NumberWrapper} from 'angular2/src/facade/lang';
|
import {isPresent, NumberWrapper} from '../../src/facade/lang';
|
||||||
import {Map} from 'angular2/src/facade/collection';
|
import {Map} from '../../src/facade/collection';
|
||||||
|
|
||||||
import {SwitchView} from './ng_switch';
|
import {SwitchView} from './ng_switch';
|
||||||
|
|
||||||
const _CATEGORY_DEFAULT = 'other';
|
const _CATEGORY_DEFAULT = 'other';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import {KeyValueChangeRecord} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
DoCheck,
|
DoCheck,
|
||||||
KeyValueDiffer,
|
KeyValueDiffer,
|
||||||
|
@ -5,9 +6,8 @@ import {
|
||||||
ElementRef,
|
ElementRef,
|
||||||
Directive,
|
Directive,
|
||||||
Renderer
|
Renderer
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
import {isPresent, isBlank, print} from 'angular2/src/facade/lang';
|
import {isPresent, isBlank} from '../../src/facade/lang';
|
||||||
import {KeyValueChangeRecord} from "../../core/change_detection/differs/default_keyvalue_differ";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The `NgStyle` directive changes styles based on a result of expression evaluation.
|
* The `NgStyle` directive changes styles based on a result of expression evaluation.
|
||||||
|
@ -24,8 +24,8 @@ import {KeyValueChangeRecord} from "../../core/change_detection/differs/default_
|
||||||
* ### Example ([live demo](http://plnkr.co/edit/YamGS6GkUh9GqWNQhCyM?p=preview)):
|
* ### Example ([live demo](http://plnkr.co/edit/YamGS6GkUh9GqWNQhCyM?p=preview)):
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* import {Component} from 'angular2/core';
|
* import {Component} from '@angular/core';
|
||||||
* import {NgStyle} from 'angular2/common';
|
* import {NgStyle} from '@angular/common';
|
||||||
*
|
*
|
||||||
* @Component({
|
* @Component({
|
||||||
* selector: 'ngStyle-example',
|
* selector: 'ngStyle-example',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {Directive, Host, ViewContainerRef, TemplateRef} from 'angular2/core';
|
import {Directive, Host, ViewContainerRef, TemplateRef} from '@angular/core';
|
||||||
import {isPresent, isBlank, normalizeBlank} from 'angular2/src/facade/lang';
|
import {isPresent, isBlank, normalizeBlank} from '../../src/facade/lang';
|
||||||
import {ListWrapper, Map} from 'angular2/src/facade/collection';
|
import {ListWrapper, Map} from '../../src/facade/collection';
|
||||||
|
|
||||||
const _WHEN_DEFAULT = /*@ts2dart_const*/ new Object();
|
const _WHEN_DEFAULT = /*@ts2dart_const*/ new Object();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {Directive, Input, ViewContainerRef, ViewRef, TemplateRef} from 'angular2/core';
|
import {Directive, Input, ViewContainerRef, ViewRef, TemplateRef} from '@angular/core';
|
||||||
import {isPresent} from 'angular2/src/facade/lang';
|
import {isPresent} from '../../src/facade/lang';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and inserts an embedded view based on a prepared `TemplateRef`.
|
* Creates and inserts an embedded view based on a prepared `TemplateRef`.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// TS does not have Observables
|
// TS does not have Observables
|
||||||
|
|
||||||
// I need to be here to make TypeScript think this is a module.
|
// I need to be here to make TypeScript think this is a module.
|
||||||
import {} from 'angular2/src/facade/lang';
|
import {} from '../../src/facade/lang';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This module exists in Dart, but not in Typescript. This exported symbol
|
* This module exists in Dart, but not in Typescript. This exported symbol
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
../../facade/src
|
|
@ -7,9 +7,7 @@
|
||||||
* to read information
|
* to read information
|
||||||
* from the form DOM elements.
|
* from the form DOM elements.
|
||||||
*
|
*
|
||||||
* This module is not included in the `angular2` module; you must import the forms module
|
* Forms providers are not included in default providers; you must import these providers explicitly.
|
||||||
* explicitly.
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
export {AbstractControl, Control, ControlGroup, ControlArray} from './forms/model';
|
export {AbstractControl, Control, ControlGroup, ControlArray} from './forms/model';
|
||||||
|
|
||||||
|
@ -43,7 +41,7 @@ export {
|
||||||
export {FormBuilder} from './forms/form_builder';
|
export {FormBuilder} from './forms/form_builder';
|
||||||
import {FormBuilder} from './forms/form_builder';
|
import {FormBuilder} from './forms/form_builder';
|
||||||
import {RadioControlRegistry} from './forms/directives/radio_control_value_accessor';
|
import {RadioControlRegistry} from './forms/directives/radio_control_value_accessor';
|
||||||
import {Type} from 'angular2/src/facade/lang';
|
import {Type} from '@angular/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand set of providers used for building Angular forms.
|
* Shorthand set of providers used for building Angular forms.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {Type} from 'angular2/src/facade/lang';
|
import {Type} from '@angular/core';
|
||||||
import {NgControlName} from './directives/ng_control_name';
|
import {NgControlName} from './directives/ng_control_name';
|
||||||
import {NgFormControl} from './directives/ng_form_control';
|
import {NgFormControl} from './directives/ng_form_control';
|
||||||
import {NgModel} from './directives/ng_model';
|
import {NgModel} from './directives/ng_model';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {AbstractControl} from '../model';
|
import {AbstractControl} from '../model';
|
||||||
import {isPresent} from 'angular2/src/facade/lang';
|
import {isPresent} from '../../../src/facade/lang';
|
||||||
import {unimplemented} from 'angular2/src/facade/exceptions';
|
import {unimplemented} from '../../../src/facade/exceptions';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for control directives.
|
* Base class for control directives.
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {Directive, Renderer, ElementRef, Self, forwardRef, Provider} from 'angular2/core';
|
import {Directive, Renderer, ElementRef, Self, forwardRef, Provider} from '@angular/core';
|
||||||
|
|
||||||
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
|
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
|
||||||
|
|
||||||
export const CHECKBOX_VALUE_ACCESSOR: any = /*@ts2dart_const*/ {
|
export const CHECKBOX_VALUE_ACCESSOR: any = /*@ts2dart_const*/ {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {OpaqueToken} from 'angular2/core';
|
import {OpaqueToken} from '@angular/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A bridge between a control and a native element.
|
* A bridge between a control and a native element.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {Directive, ElementRef, Renderer, Self, forwardRef, Provider} from 'angular2/core';
|
import {Directive, ElementRef, Renderer, forwardRef} from '@angular/core';
|
||||||
|
import {isBlank} from '../../../src/facade/lang';
|
||||||
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
|
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
|
||||||
import {isBlank} from 'angular2/src/facade/lang';
|
|
||||||
|
|
||||||
export const DEFAULT_VALUE_ACCESSOR: any = /*@ts2dart_const*/
|
export const DEFAULT_VALUE_ACCESSOR: any = /*@ts2dart_const*/
|
||||||
/* @ts2dart_Provider */ {
|
/* @ts2dart_Provider */ {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import {unimplemented} from '../../../src/facade/exceptions';
|
||||||
|
|
||||||
import {ControlValueAccessor} from './control_value_accessor';
|
import {ControlValueAccessor} from './control_value_accessor';
|
||||||
import {AbstractControlDirective} from './abstract_control_directive';
|
import {AbstractControlDirective} from './abstract_control_directive';
|
||||||
import {unimplemented} from 'angular2/src/facade/exceptions';
|
|
||||||
import {AsyncValidatorFn, ValidatorFn} from './validators';
|
import {AsyncValidatorFn, ValidatorFn} from './validators';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,8 +9,7 @@ import {
|
||||||
forwardRef,
|
forwardRef,
|
||||||
Provider,
|
Provider,
|
||||||
Self
|
Self
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import {ControlContainer} from './control_container';
|
import {ControlContainer} from './control_container';
|
||||||
import {controlPath, composeValidators, composeAsyncValidators} from './shared';
|
import {controlPath, composeValidators, composeAsyncValidators} from './shared';
|
||||||
import {ControlGroup} from '../model';
|
import {ControlGroup} from '../model';
|
||||||
|
@ -37,7 +36,7 @@ export const controlGroupProvider: any =
|
||||||
* directives: [FORM_DIRECTIVES],
|
* directives: [FORM_DIRECTIVES],
|
||||||
* template: `
|
* template: `
|
||||||
* <div>
|
* <div>
|
||||||
* <h2>Angular2 Control & ControlGroup Example</h2>
|
* <h2>Angular Control & ControlGroup Example</h2>
|
||||||
* <form #f="ngForm">
|
* <form #f="ngForm">
|
||||||
* <div ngControlGroup="name" #cg-name="form">
|
* <div ngControlGroup="name" #cg-name="form">
|
||||||
* <h3>Enter your name:</h3>
|
* <h3>Enter your name:</h3>
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
|
@ -13,8 +11,9 @@ import {
|
||||||
Inject,
|
Inject,
|
||||||
Optional,
|
Optional,
|
||||||
Self
|
Self
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
|
import {EventEmitter, ObservableWrapper} from '../../../src/facade/async';
|
||||||
import {ControlContainer} from './control_container';
|
import {ControlContainer} from './control_container';
|
||||||
import {NgControl} from './ng_control';
|
import {NgControl} from './ng_control';
|
||||||
import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';
|
import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {Directive, Self} from 'angular2/core';
|
import {Directive, Self} from '@angular/core';
|
||||||
import {NgControl} from './ng_control';
|
import {NgControl} from './ng_control';
|
||||||
import {isBlank, isPresent} from 'angular2/src/facade/lang';
|
import {isPresent} from '../../../src/facade/lang';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Directive automatically applied to Angular forms that sets CSS classes
|
* Directive automatically applied to Angular forms that sets CSS classes
|
||||||
|
|
|
@ -1,25 +1,22 @@
|
||||||
|
import {Directive, forwardRef, Provider, Optional, Inject, Self} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
PromiseWrapper,
|
PromiseWrapper,
|
||||||
ObservableWrapper,
|
ObservableWrapper,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
PromiseCompleter
|
PromiseCompleter
|
||||||
} from 'angular2/src/facade/async';
|
} from '../../../src/facade/async';
|
||||||
import {StringMapWrapper, ListWrapper} from 'angular2/src/facade/collection';
|
import {ListWrapper} from '../../../src/facade/collection';
|
||||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
import {isPresent} from '../../../src/facade/lang';
|
||||||
import {Directive, forwardRef, Provider, Optional, Inject, Self} from 'angular2/core';
|
|
||||||
import {NgControl} from './ng_control';
|
import {NgControl} from './ng_control';
|
||||||
import {Form} from './form_interface';
|
import {Form} from './form_interface';
|
||||||
import {NgControlGroup} from './ng_control_group';
|
import {NgControlGroup} from './ng_control_group';
|
||||||
import {ControlContainer} from './control_container';
|
import {ControlContainer} from './control_container';
|
||||||
import {AbstractControl, ControlGroup, Control} from '../model';
|
import {AbstractControl, ControlGroup, Control} from '../model';
|
||||||
import {setUpControl, setUpControlGroup, composeValidators, composeAsyncValidators} from './shared';
|
import {setUpControl, setUpControlGroup, composeValidators, composeAsyncValidators} from './shared';
|
||||||
import {Validators, NG_VALIDATORS, NG_ASYNC_VALIDATORS} from '../validators';
|
import {NG_VALIDATORS, NG_ASYNC_VALIDATORS} from '../validators';
|
||||||
|
|
||||||
export const formDirectiveProvider: any =
|
export const formDirectiveProvider: any =
|
||||||
/*@ts2dart_const*/ /* @ts2dart_Provider */ {
|
/*@ts2dart_const*/ {provide: ControlContainer, useExisting: forwardRef(() => NgForm)};
|
||||||
provide: ControlContainer,
|
|
||||||
useExisting: forwardRef(() => NgForm)
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If `NgForm` is bound in a component, `<form>` elements in that component will be
|
* If `NgForm` is bound in a component, `<form>` elements in that component will be
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
|
||||||
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
|
||||||
import {
|
import {
|
||||||
OnChanges,
|
OnChanges,
|
||||||
SimpleChange,
|
SimpleChange,
|
||||||
|
@ -10,10 +8,14 @@ import {
|
||||||
Inject,
|
Inject,
|
||||||
Optional,
|
Optional,
|
||||||
Self
|
Self
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
|
import {StringMapWrapper} from '../../../src/facade/collection';
|
||||||
|
import {EventEmitter, ObservableWrapper} from '../../../src/facade/async';
|
||||||
|
|
||||||
import {NgControl} from './ng_control';
|
import {NgControl} from './ng_control';
|
||||||
import {Control} from '../model';
|
import {Control} from '../model';
|
||||||
import {Validators, NG_VALIDATORS, NG_ASYNC_VALIDATORS} from '../validators';
|
import {NG_VALIDATORS, NG_ASYNC_VALIDATORS} from '../validators';
|
||||||
import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';
|
import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';
|
||||||
import {
|
import {
|
||||||
setUpControl,
|
setUpControl,
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
import {isBlank} from 'angular2/src/facade/lang';
|
|
||||||
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
|
|
||||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
|
||||||
import {ObservableWrapper, EventEmitter} from 'angular2/src/facade/async';
|
|
||||||
import {
|
import {
|
||||||
SimpleChange,
|
SimpleChange,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
|
@ -11,7 +7,11 @@ import {
|
||||||
Inject,
|
Inject,
|
||||||
Optional,
|
Optional,
|
||||||
Self
|
Self
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
|
import {isBlank} from '../../../src/facade/lang';
|
||||||
|
import {ListWrapper, StringMapWrapper} from '../../../src/facade/collection';
|
||||||
|
import {BaseException} from '../../../src/facade/exceptions';
|
||||||
|
import {ObservableWrapper, EventEmitter} from '../../../src/facade/async';
|
||||||
import {NgControl} from './ng_control';
|
import {NgControl} from './ng_control';
|
||||||
import {NgControlGroup} from './ng_control_group';
|
import {NgControlGroup} from './ng_control_group';
|
||||||
import {ControlContainer} from './control_container';
|
import {ControlContainer} from './control_container';
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
|
||||||
import {
|
import {
|
||||||
OnChanges,
|
OnChanges,
|
||||||
SimpleChange,
|
SimpleChange,
|
||||||
|
@ -8,7 +7,8 @@ import {
|
||||||
Inject,
|
Inject,
|
||||||
Optional,
|
Optional,
|
||||||
Self
|
Self
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
|
import {EventEmitter, ObservableWrapper} from '../../../src/facade/async';
|
||||||
import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';
|
import {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';
|
||||||
import {NgControl} from './ng_control';
|
import {NgControl} from './ng_control';
|
||||||
import {Control} from '../model';
|
import {Control} from '../model';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {AbstractControl} from "../model";
|
import {AbstractControl} from '../model';
|
||||||
import {Validator, ValidatorFn, AsyncValidatorFn} from './validators';
|
import {Validator, ValidatorFn, AsyncValidatorFn} from './validators';
|
||||||
|
|
||||||
export function normalizeValidator(validator: ValidatorFn | Validator): ValidatorFn {
|
export function normalizeValidator(validator: ValidatorFn | Validator): ValidatorFn {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {Directive, ElementRef, Renderer, Self, forwardRef} from 'angular2/core';
|
import {Directive, ElementRef, Renderer, Self, forwardRef, Provider} from '@angular/core';
|
||||||
|
import {NumberWrapper} from '../../../src/facade/lang';
|
||||||
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
|
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
|
||||||
import {isBlank, NumberWrapper} from 'angular2/src/facade/lang';
|
|
||||||
|
|
||||||
export const NUMBER_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ {
|
export const NUMBER_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ {
|
||||||
provide: NG_VALUE_ACCESSOR,
|
provide: NG_VALUE_ACCESSOR,
|
||||||
|
|
|
@ -2,23 +2,21 @@ import {
|
||||||
Directive,
|
Directive,
|
||||||
ElementRef,
|
ElementRef,
|
||||||
Renderer,
|
Renderer,
|
||||||
Self,
|
|
||||||
forwardRef,
|
forwardRef,
|
||||||
Provider,
|
Provider,
|
||||||
Attribute,
|
|
||||||
Input,
|
Input,
|
||||||
OnInit,
|
OnInit,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
Injector,
|
Injector,
|
||||||
Injectable
|
Injectable
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
|
import {isPresent} from '../../../src/facade/lang';
|
||||||
|
import {ListWrapper} from '../../../src/facade/collection';
|
||||||
import {
|
import {
|
||||||
NG_VALUE_ACCESSOR,
|
NG_VALUE_ACCESSOR,
|
||||||
ControlValueAccessor
|
ControlValueAccessor
|
||||||
} from 'angular2/src/common/forms/directives/control_value_accessor';
|
} from './control_value_accessor';
|
||||||
import {NgControl} from 'angular2/src/common/forms/directives/ng_control';
|
import {NgControl} from './ng_control';
|
||||||
import {looseIdentical, isPresent} from 'angular2/src/facade/lang';
|
|
||||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
|
||||||
|
|
||||||
export const RADIO_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ {
|
export const RADIO_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ {
|
||||||
provide: NG_VALUE_ACCESSOR,
|
provide: NG_VALUE_ACCESSOR,
|
||||||
|
|
|
@ -8,17 +8,17 @@ import {
|
||||||
Host,
|
Host,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
Optional
|
Optional
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
|
|
||||||
import {
|
import {
|
||||||
StringWrapper,
|
StringWrapper,
|
||||||
isPrimitive,
|
isPrimitive,
|
||||||
isPresent,
|
isPresent,
|
||||||
isBlank,
|
isBlank,
|
||||||
looseIdentical
|
looseIdentical
|
||||||
} from 'angular2/src/facade/lang';
|
} from '../../../src/facade/lang';
|
||||||
|
import {MapWrapper} from '../../../src/facade/collection';
|
||||||
|
|
||||||
import {MapWrapper} from 'angular2/src/facade/collection';
|
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from './control_value_accessor';
|
||||||
|
|
||||||
export const SELECT_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ {
|
export const SELECT_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ {
|
||||||
provide: NG_VALUE_ACCESSOR,
|
provide: NG_VALUE_ACCESSOR,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
|
import {ListWrapper, StringMapWrapper} from '../../../src/facade/collection';
|
||||||
import {isBlank, isPresent, looseIdentical, hasConstructor} from 'angular2/src/facade/lang';
|
import {isBlank, isPresent, looseIdentical, hasConstructor} from '../../../src/facade/lang';
|
||||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
import {BaseException} from '../../../src/facade/exceptions';
|
||||||
|
|
||||||
import {ControlContainer} from './control_container';
|
import {ControlContainer} from './control_container';
|
||||||
import {NgControl} from './ng_control';
|
import {NgControl} from './ng_control';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {forwardRef, Attribute, Directive} from 'angular2/core';
|
import {forwardRef, Attribute, Directive} from '@angular/core';
|
||||||
import {NumberWrapper} from 'angular2/src/facade/lang';
|
import {NumberWrapper} from '../../facade/lang';
|
||||||
import {Validators, NG_VALIDATORS} from '../validators';
|
import {Validators, NG_VALIDATORS} from '../validators';
|
||||||
import {AbstractControl} from '../model';
|
import {AbstractControl} from '../model';
|
||||||
import * as modelModule from '../model';
|
import * as modelModule from '../model';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
import {StringMapWrapper} from '../../src/facade/collection';
|
||||||
import {isPresent, isArray, Type} from 'angular2/src/facade/lang';
|
import {isPresent, isArray} from '../../src/facade/lang';
|
||||||
import * as modelModule from './model';
|
import * as modelModule from './model';
|
||||||
import {ValidatorFn, AsyncValidatorFn} from './directives/validators';
|
import {ValidatorFn, AsyncValidatorFn} from './directives/validators';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {isPresent, isBlank, normalizeBool} from 'angular2/src/facade/lang';
|
import {isPresent, isBlank, normalizeBool} from '../../src/facade/lang';
|
||||||
import {Observable, EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
import {Observable, EventEmitter, ObservableWrapper} from '../../src/facade/async';
|
||||||
import {PromiseWrapper} from 'angular2/src/facade/promise';
|
import {PromiseWrapper} from '../../src/facade/promise';
|
||||||
import {StringMapWrapper, ListWrapper} from 'angular2/src/facade/collection';
|
import {StringMapWrapper, ListWrapper} from '../../src/facade/collection';
|
||||||
import {ValidatorFn, AsyncValidatorFn} from './directives/validators';
|
import {ValidatorFn, AsyncValidatorFn} from './directives/validators';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import {isBlank, isPresent, isString} from 'angular2/src/facade/lang';
|
import {OpaqueToken} from '@angular/core';
|
||||||
import {PromiseWrapper} from 'angular2/src/facade/promise';
|
|
||||||
import {ObservableWrapper} from 'angular2/src/facade/async';
|
|
||||||
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
|
|
||||||
import {OpaqueToken} from 'angular2/core';
|
|
||||||
|
|
||||||
|
import {isBlank, isPresent, isString} from '../../src/facade/lang';
|
||||||
|
import {PromiseWrapper} from '../../src/facade/promise';
|
||||||
|
import {ObservableWrapper} from '../../src/facade/async';
|
||||||
|
import {StringMapWrapper} from '../../src/facade/collection';
|
||||||
import * as modelModule from './model';
|
import * as modelModule from './model';
|
||||||
import {ValidatorFn, AsyncValidatorFn} from './directives/validators';
|
import {ValidatorFn, AsyncValidatorFn} from './directives/validators';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export * from './browser/location/platform_location';
|
export * from './location/platform_location';
|
||||||
export * from './browser/location/location_strategy';
|
export * from './location/location_strategy';
|
||||||
export * from './browser/location/hash_location_strategy';
|
export * from './location/hash_location_strategy';
|
||||||
export * from './browser/location/path_location_strategy';
|
export * from './location/path_location_strategy';
|
||||||
export * from './browser/location/location';
|
export * from './location/location';
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import {Injectable, Inject, Optional} from 'angular2/core';
|
import {Injectable, Inject, Optional} from '@angular/core';
|
||||||
|
import {isPresent} from '../../src/facade/lang';
|
||||||
|
|
||||||
import {LocationStrategy, APP_BASE_HREF} from './location_strategy';
|
import {LocationStrategy, APP_BASE_HREF} from './location_strategy';
|
||||||
import {Location} from './location';
|
import {Location} from './location';
|
||||||
import {UrlChangeListener, PlatformLocation} from './platform_location';
|
import {UrlChangeListener, PlatformLocation} from './platform_location';
|
||||||
import {isPresent} from 'angular2/src/facade/lang';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `HashLocationStrategy` is a {@link LocationStrategy} used to configure the
|
* `HashLocationStrategy` is a {@link LocationStrategy} used to configure the
|
||||||
|
@ -16,17 +18,17 @@ import {isPresent} from 'angular2/src/facade/lang';
|
||||||
* ### Example
|
* ### Example
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* import {Component, provide} from 'angular2/core';
|
* import {Component, provide} from '@angular/core';
|
||||||
* import {
|
* import {
|
||||||
* Location,
|
* Location,
|
||||||
* LocationStrategy,
|
* LocationStrategy,
|
||||||
* HashLocationStrategy
|
* HashLocationStrategy
|
||||||
* } from 'angular2/platform/common';
|
* } from '@angular/common';
|
||||||
* import {
|
* import {
|
||||||
* ROUTER_DIRECTIVES,
|
* ROUTER_DIRECTIVES,
|
||||||
* ROUTER_PROVIDERS,
|
* ROUTER_PROVIDERS,
|
||||||
* RouteConfig
|
* RouteConfig
|
||||||
* } from 'angular2/router';
|
* } from '@angular/router';
|
||||||
*
|
*
|
||||||
* @Component({directives: [ROUTER_DIRECTIVES]})
|
* @Component({directives: [ROUTER_DIRECTIVES]})
|
||||||
* @RouteConfig([
|
* @RouteConfig([
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
import {Injectable, Inject} from '@angular/core';
|
||||||
import {Injectable, Inject} from 'angular2/core';
|
import {EventEmitter, ObservableWrapper} from '../../src/facade/async';
|
||||||
|
|
||||||
import {LocationStrategy} from './location_strategy';
|
import {LocationStrategy} from './location_strategy';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,13 +22,13 @@ import {LocationStrategy} from './location_strategy';
|
||||||
* ### Example
|
* ### Example
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* import {Component} from 'angular2/core';
|
* import {Component} from '@angular/core';
|
||||||
* import {Location} from 'angular2/platform/common';
|
* import {Location} from '@angular/common';
|
||||||
* import {
|
* import {
|
||||||
* ROUTER_DIRECTIVES,
|
* ROUTER_DIRECTIVES,
|
||||||
* ROUTER_PROVIDERS,
|
* ROUTER_PROVIDERS,
|
||||||
* RouteConfig
|
* RouteConfig
|
||||||
* } from 'angular2/router';
|
* } from '@angular/router';
|
||||||
*
|
*
|
||||||
* @Component({directives: [ROUTER_DIRECTIVES]})
|
* @Component({directives: [ROUTER_DIRECTIVES]})
|
||||||
* @RouteConfig([
|
* @RouteConfig([
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {OpaqueToken} from 'angular2/core';
|
import {OpaqueToken} from '@angular/core';
|
||||||
import {UrlChangeListener} from './platform_location';
|
import {UrlChangeListener} from './platform_location';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,9 +40,9 @@ export abstract class LocationStrategy {
|
||||||
* ### Example
|
* ### Example
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* import {Component} from 'angular2/core';
|
* import {Component} from '@angular/core';
|
||||||
* import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
|
* import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from '@angular/router';
|
||||||
* import {APP_BASE_HREF} from 'angular2/platform/common';
|
* import {APP_BASE_HREF} from '@angular/common';
|
||||||
*
|
*
|
||||||
* @Component({directives: [ROUTER_DIRECTIVES]})
|
* @Component({directives: [ROUTER_DIRECTIVES]})
|
||||||
* @RouteConfig([
|
* @RouteConfig([
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import {Injectable, Inject, Optional} from 'angular2/core';
|
import {Injectable, Inject, Optional} from '@angular/core';
|
||||||
import {isBlank} from 'angular2/src/facade/lang';
|
import {isBlank} from '../../src/facade/lang';
|
||||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
import {BaseException} from '../../src/facade/exceptions';
|
||||||
|
|
||||||
import {PlatformLocation, UrlChangeListener} from './platform_location';
|
import {PlatformLocation, UrlChangeListener} from './platform_location';
|
||||||
import {LocationStrategy, APP_BASE_HREF} from './location_strategy';
|
import {LocationStrategy, APP_BASE_HREF} from './location_strategy';
|
||||||
import {Location} from './location';
|
import {Location} from './location';
|
||||||
|
@ -25,17 +26,17 @@ import {Location} from './location';
|
||||||
* ### Example
|
* ### Example
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* import {Component, provide} from 'angular2/core';
|
* import {Component, provide} from '@angular/core';
|
||||||
* import {bootstrap} from 'angular2/platform/browser';
|
* import {bootstrap} from '@angular/platform-browser/browser';
|
||||||
* import {
|
* import {
|
||||||
* Location,
|
* Location,
|
||||||
* APP_BASE_HREF
|
* APP_BASE_HREF
|
||||||
* } from 'angular2/platform/common';
|
* } from '@angular/common';
|
||||||
* import {
|
* import {
|
||||||
* ROUTER_DIRECTIVES,
|
* ROUTER_DIRECTIVES,
|
||||||
* ROUTER_PROVIDERS,
|
* ROUTER_PROVIDERS,
|
||||||
* RouteConfig
|
* RouteConfig
|
||||||
* } from 'angular2/router';
|
* } from '@angular/router';
|
||||||
*
|
*
|
||||||
* @Component({directives: [ROUTER_DIRECTIVES]})
|
* @Component({directives: [ROUTER_DIRECTIVES]})
|
||||||
* @RouteConfig([
|
* @RouteConfig([
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
import {isBlank, isPresent, isPromise} from 'angular2/src/facade/lang';
|
import {
|
||||||
import {ObservableWrapper, Observable, EventEmitter} from 'angular2/src/facade/async';
|
Pipe,
|
||||||
import {Pipe, Injectable, ChangeDetectorRef, OnDestroy, WrappedValue} from 'angular2/core';
|
Injectable,
|
||||||
|
ChangeDetectorRef,
|
||||||
|
OnDestroy,
|
||||||
|
WrappedValue
|
||||||
|
} from '@angular/core';
|
||||||
|
|
||||||
|
import {isBlank, isPresent, isPromise} from '../../src/facade/lang';
|
||||||
|
import {ObservableWrapper, Observable, EventEmitter} from '../../src/facade/async';
|
||||||
|
|
||||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
|
import {PipeTransform, Pipe, Injectable} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
isDate,
|
isDate,
|
||||||
isNumber,
|
isNumber,
|
||||||
isPresent,
|
|
||||||
Date,
|
|
||||||
DateWrapper,
|
DateWrapper,
|
||||||
isBlank,
|
isBlank,
|
||||||
FunctionWrapper
|
} from '../../src/facade/lang';
|
||||||
} from 'angular2/src/facade/lang';
|
import {DateFormatter} from '../../src/facade/intl';
|
||||||
import {DateFormatter} from 'angular2/src/facade/intl';
|
import {StringMapWrapper} from '../../src/facade/collection';
|
||||||
import {PipeTransform, WrappedValue, Pipe, Injectable} from 'angular2/core';
|
|
||||||
import {StringMapWrapper, ListWrapper} from 'angular2/src/facade/collection';
|
|
||||||
|
|
||||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import {isStringMap, StringWrapper, isPresent, RegExpWrapper} from 'angular2/src/facade/lang';
|
import {Injectable, PipeTransform, Pipe} from '@angular/core';
|
||||||
import {Injectable, PipeTransform, Pipe} from 'angular2/core';
|
import {
|
||||||
|
isStringMap,
|
||||||
|
StringWrapper,
|
||||||
|
isPresent,
|
||||||
|
RegExpWrapper
|
||||||
|
} from '../../src/facade/lang';
|
||||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||||
|
|
||||||
var interpolationExp: RegExp = RegExpWrapper.create('#');
|
var interpolationExp: RegExp = RegExpWrapper.create('#');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {isStringMap} from 'angular2/src/facade/lang';
|
import {Injectable, PipeTransform, Pipe} from '@angular/core';
|
||||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
import {isStringMap} from '../../src/facade/lang';
|
||||||
import {Injectable, PipeTransform, Pipe} from 'angular2/core';
|
import {StringMapWrapper} from '../../src/facade/collection';
|
||||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {Type, stringify} from 'angular2/src/facade/lang';
|
import {Type, stringify} from '../../src/facade/lang';
|
||||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
import {BaseException} from '../../src/facade/exceptions';
|
||||||
|
|
||||||
export class InvalidPipeArgumentException extends BaseException {
|
export class InvalidPipeArgumentException extends BaseException {
|
||||||
constructor(type: Type, value: Object) {
|
constructor(type: Type, value: Object) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import {isBlank, isPresent, Json} from 'angular2/src/facade/lang';
|
import {Injectable, PipeTransform, WrappedValue, Pipe} from '@angular/core';
|
||||||
import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core';
|
import {Json} from '../../src/facade/lang';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transforms any input value using `JSON.stringify`. Useful for debugging.
|
* Transforms any input value using `JSON.stringify`. Useful for debugging.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {isString, isBlank} from 'angular2/src/facade/lang';
|
import {Injectable, PipeTransform, WrappedValue, Pipe} from '@angular/core';
|
||||||
import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core';
|
import {isString, isBlank} from '../../src/facade/lang';
|
||||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +9,7 @@ import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||||
*
|
*
|
||||||
* {@example core/pipes/ts/lowerupper_pipe/lowerupper_pipe_example.ts region='LowerUpperPipe'}
|
* {@example core/pipes/ts/lowerupper_pipe/lowerupper_pipe_example.ts region='LowerUpperPipe'}
|
||||||
*/
|
*/
|
||||||
|
/* @ts2dart_const */
|
||||||
@Pipe({name: 'lowercase'})
|
@Pipe({name: 'lowercase'})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class LowerCasePipe implements PipeTransform {
|
export class LowerCasePipe implements PipeTransform {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
|
import {Injectable, PipeTransform, WrappedValue, Pipe} from '@angular/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isNumber,
|
isNumber,
|
||||||
isPresent,
|
isPresent,
|
||||||
isBlank,
|
isBlank,
|
||||||
StringWrapper,
|
|
||||||
NumberWrapper,
|
NumberWrapper,
|
||||||
RegExpWrapper,
|
RegExpWrapper,
|
||||||
FunctionWrapper
|
} from '../../src/facade/lang';
|
||||||
} from 'angular2/src/facade/lang';
|
import {BaseException} from '../../src/facade/exceptions';
|
||||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
import {NumberFormatter, NumberFormatStyle} from '../../src/facade/intl';
|
||||||
import {NumberFormatter, NumberFormatStyle} from 'angular2/src/facade/intl';
|
import {ListWrapper} from '../../src/facade/collection';
|
||||||
import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core';
|
|
||||||
|
|
||||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import {Injectable, PipeTransform, Pipe} from '@angular/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isBlank,
|
isBlank,
|
||||||
isString,
|
isString,
|
||||||
|
@ -5,8 +7,8 @@ import {
|
||||||
isFunction,
|
isFunction,
|
||||||
RegExpWrapper,
|
RegExpWrapper,
|
||||||
StringWrapper
|
StringWrapper
|
||||||
} from 'angular2/src/facade/lang';
|
} from '../../src/facade/lang';
|
||||||
import {Injectable, PipeTransform, Pipe} from 'angular2/core';
|
|
||||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
import {isBlank, isString, isArray, StringWrapper} from 'angular2/src/facade/lang';
|
import {Injectable, PipeTransform, WrappedValue, Pipe} from '@angular/core';
|
||||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
|
||||||
import {Injectable, PipeTransform, WrappedValue, Pipe} from 'angular2/core';
|
import {isBlank, isString, isArray, StringWrapper} from '../../src/facade/lang';
|
||||||
|
import {BaseException} from '../../src/facade/exceptions';
|
||||||
|
import {ListWrapper} from '../../src/facade/collection';
|
||||||
|
|
||||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {isString, isBlank} from 'angular2/src/facade/lang';
|
import {PipeTransform, WrappedValue, Injectable, Pipe} from '@angular/core';
|
||||||
import {PipeTransform, WrappedValue, Injectable, Pipe} from 'angular2/core';
|
import {isString, isBlank} from '../../src/facade/lang';
|
||||||
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
import {InvalidPipeArgumentException} from './invalid_pipe_argument_exception';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,23 +1,20 @@
|
||||||
import {
|
import {
|
||||||
ComponentFixture,
|
|
||||||
AsyncTestCompleter,
|
|
||||||
TestComponentBuilder,
|
|
||||||
beforeEach,
|
beforeEach,
|
||||||
beforeEachProviders,
|
beforeEachProviders,
|
||||||
ddescribe,
|
ddescribe,
|
||||||
xdescribe,
|
xdescribe,
|
||||||
describe,
|
describe,
|
||||||
el,
|
|
||||||
expect,
|
expect,
|
||||||
iit,
|
iit,
|
||||||
inject,
|
inject,
|
||||||
it,
|
it,
|
||||||
xit,
|
xit,
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
import {ListWrapper, StringMapWrapper, SetWrapper} from 'angular2/src/facade/collection';
|
import { ComponentFixture, TestComponentBuilder } from '@angular/compiler/testing';
|
||||||
import {Component, provide} from 'angular2/core';
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
import {NgFor} from 'angular2/common';
|
import {ListWrapper, StringMapWrapper, SetWrapper} from '../../src/facade/collection';
|
||||||
import {NgClass} from 'angular2/src/common/directives/ng_class';
|
import {Component, provide} from '@angular/core';
|
||||||
|
import {NgFor, NgClass} from '@angular/common';
|
||||||
|
|
||||||
function detectChangesAndCheck(fixture: ComponentFixture<any>, classes: string) {
|
function detectChangesAndCheck(fixture: ComponentFixture<any>, classes: string) {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
|
@ -1,24 +1,23 @@
|
||||||
import {
|
import {
|
||||||
AsyncTestCompleter,
|
|
||||||
TestComponentBuilder,
|
|
||||||
beforeEach,
|
beforeEach,
|
||||||
beforeEachProviders,
|
beforeEachProviders,
|
||||||
ddescribe,
|
ddescribe,
|
||||||
describe,
|
describe,
|
||||||
el,
|
|
||||||
expect,
|
|
||||||
iit,
|
iit,
|
||||||
inject,
|
inject,
|
||||||
it,
|
it,
|
||||||
xit,
|
xit,
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
import {expect} from '@angular/platform-browser/testing';
|
||||||
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
|
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||||
|
|
||||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
import {ListWrapper} from '../../src/facade/collection';
|
||||||
import {IS_DART} from 'angular2/src/facade/lang';
|
import {IS_DART} from '../../src/facade/lang';
|
||||||
import {Component, TemplateRef, ContentChild} from 'angular2/core';
|
import {Component, TemplateRef, ContentChild} from '@angular/core';
|
||||||
import {NgFor} from 'angular2/src/common/directives/ng_for';
|
import {NgFor} from '@angular/common';
|
||||||
import {NgIf} from 'angular2/src/common/directives/ng_if';
|
import {NgIf} from '@angular/common';
|
||||||
import {By} from 'angular2/platform/common_dom';
|
import {By} from '@angular/platform-browser/src/dom/debug/by';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('ngFor', () => {
|
describe('ngFor', () => {
|
||||||
|
|
|
@ -1,23 +1,22 @@
|
||||||
import {
|
import {
|
||||||
AsyncTestCompleter,
|
|
||||||
TestComponentBuilder,
|
|
||||||
beforeEach,
|
beforeEach,
|
||||||
ddescribe,
|
ddescribe,
|
||||||
describe,
|
describe,
|
||||||
el,
|
|
||||||
expect,
|
|
||||||
iit,
|
iit,
|
||||||
inject,
|
inject,
|
||||||
it,
|
it,
|
||||||
xit,
|
xit,
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
import {expect} from '@angular/platform-browser/testing';
|
||||||
|
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||||
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||||
|
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {NgIf} from 'angular2/common';
|
import {NgIf} from '@angular/common';
|
||||||
|
|
||||||
import {IS_DART} from 'angular2/src/facade/lang';
|
import {IS_DART} from '../../src/facade/lang';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('ngIf directive', () => {
|
describe('ngIf directive', () => {
|
||||||
|
@ -29,7 +28,7 @@ export function main() {
|
||||||
.createAsync(TestComponent)
|
.createAsync(TestComponent)
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(1);
|
.toEqual(1);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
||||||
async.done();
|
async.done();
|
||||||
|
@ -45,7 +44,7 @@ export function main() {
|
||||||
.createAsync(TestComponent)
|
.createAsync(TestComponent)
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(1);
|
.toEqual(1);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('hello2');
|
expect(fixture.debugElement.nativeElement).toHaveText('hello2');
|
||||||
async.done();
|
async.done();
|
||||||
|
@ -61,19 +60,19 @@ export function main() {
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.booleanCondition = false;
|
fixture.debugElement.componentInstance.booleanCondition = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(0);
|
.toEqual(0);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('');
|
expect(fixture.debugElement.nativeElement).toHaveText('');
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.booleanCondition = true;
|
fixture.debugElement.componentInstance.booleanCondition = true;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(1);
|
.toEqual(1);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.booleanCondition = false;
|
fixture.debugElement.componentInstance.booleanCondition = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(0);
|
.toEqual(0);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('');
|
expect(fixture.debugElement.nativeElement).toHaveText('');
|
||||||
|
|
||||||
|
@ -91,31 +90,31 @@ export function main() {
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.booleanCondition = false;
|
fixture.debugElement.componentInstance.booleanCondition = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(0);
|
.toEqual(0);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('');
|
expect(fixture.debugElement.nativeElement).toHaveText('');
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.booleanCondition = true;
|
fixture.debugElement.componentInstance.booleanCondition = true;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(1);
|
.toEqual(1);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.nestedBooleanCondition = false;
|
fixture.debugElement.componentInstance.nestedBooleanCondition = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(0);
|
.toEqual(0);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('');
|
expect(fixture.debugElement.nativeElement).toHaveText('');
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.nestedBooleanCondition = true;
|
fixture.debugElement.componentInstance.nestedBooleanCondition = true;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(1);
|
.toEqual(1);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.booleanCondition = false;
|
fixture.debugElement.componentInstance.booleanCondition = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(0);
|
.toEqual(0);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('');
|
expect(fixture.debugElement.nativeElement).toHaveText('');
|
||||||
|
|
||||||
|
@ -136,21 +135,21 @@ export function main() {
|
||||||
.createAsync(TestComponent)
|
.createAsync(TestComponent)
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(3);
|
.toEqual(3);
|
||||||
expect(DOM.getText(fixture.debugElement.nativeElement))
|
expect(getDOM().getText(fixture.debugElement.nativeElement))
|
||||||
.toEqual('helloNumberhelloStringhelloFunction');
|
.toEqual('helloNumberhelloStringhelloFunction');
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.numberCondition = 0;
|
fixture.debugElement.componentInstance.numberCondition = 0;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(1);
|
.toEqual(1);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('helloString');
|
expect(fixture.debugElement.nativeElement).toHaveText('helloString');
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.numberCondition = 1;
|
fixture.debugElement.componentInstance.numberCondition = 1;
|
||||||
fixture.debugElement.componentInstance.stringCondition = "bar";
|
fixture.debugElement.componentInstance.stringCondition = "bar";
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(1);
|
.toEqual(1);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('helloNumber');
|
expect(fixture.debugElement.nativeElement).toHaveText('helloNumber');
|
||||||
async.done();
|
async.done();
|
||||||
|
@ -167,13 +166,13 @@ export function main() {
|
||||||
.createAsync(TestComponent)
|
.createAsync(TestComponent)
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(1);
|
.toEqual(1);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.numberCondition = 2;
|
fixture.debugElement.componentInstance.numberCondition = 2;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(1);
|
.toEqual(1);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
expect(fixture.debugElement.nativeElement).toHaveText('hello');
|
||||||
|
|
||||||
|
@ -189,13 +188,13 @@ export function main() {
|
||||||
.createAsync(TestComponent)
|
.createAsync(TestComponent)
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
DOM.addClass(DOM.querySelector(fixture.debugElement.nativeElement, 'copy-me'),
|
getDOM().addClass(getDOM().querySelector(fixture.debugElement.nativeElement, 'copy-me'),
|
||||||
"foo");
|
"foo");
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.numberCondition = 2;
|
fixture.debugElement.componentInstance.numberCondition = 2;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(
|
expect(
|
||||||
DOM.hasClass(DOM.querySelector(fixture.debugElement.nativeElement, 'copy-me'),
|
getDOM().hasClass(getDOM().querySelector(fixture.debugElement.nativeElement, 'copy-me'),
|
||||||
"foo"))
|
"foo"))
|
||||||
.toBe(true);
|
.toBe(true);
|
||||||
|
|
||||||
|
@ -213,7 +212,7 @@ export function main() {
|
||||||
.createAsync(TestComponent)
|
.createAsync(TestComponent)
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
expect(() => fixture.detectChanges()).toThrowError();
|
expect(() => fixture.detectChanges()).toThrowError();
|
||||||
expect(DOM.querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
expect(getDOM().querySelectorAll(fixture.debugElement.nativeElement, 'copy-me').length)
|
||||||
.toEqual(0);
|
.toEqual(0);
|
||||||
expect(fixture.debugElement.nativeElement).toHaveText('');
|
expect(fixture.debugElement.nativeElement).toHaveText('');
|
||||||
async.done();
|
async.done();
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
import {
|
import {
|
||||||
AsyncTestCompleter,
|
|
||||||
TestComponentBuilder,
|
|
||||||
beforeEachProviders,
|
beforeEachProviders,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
ddescribe,
|
ddescribe,
|
||||||
describe,
|
describe,
|
||||||
el,
|
|
||||||
expect,
|
expect,
|
||||||
iit,
|
iit,
|
||||||
inject,
|
inject,
|
||||||
it,
|
it,
|
||||||
xit,
|
xit,
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
|
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||||
|
|
||||||
import {Component, Injectable, provide} from 'angular2/core';
|
import {Component, Injectable, provide} from '@angular/core';
|
||||||
import {NgPlural, NgPluralCase, NgLocalization} from 'angular2/common';
|
import {NgPlural, NgPluralCase, NgLocalization} from '@angular/common';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('switch', () => {
|
describe('switch', () => {
|
||||||
|
|
|
@ -1,25 +1,24 @@
|
||||||
import {
|
import {
|
||||||
AsyncTestCompleter,
|
|
||||||
TestComponentBuilder,
|
|
||||||
beforeEach,
|
beforeEach,
|
||||||
beforeEachProviders,
|
beforeEachProviders,
|
||||||
ddescribe,
|
ddescribe,
|
||||||
xdescribe,
|
xdescribe,
|
||||||
describe,
|
describe,
|
||||||
el,
|
|
||||||
expect,
|
expect,
|
||||||
iit,
|
iit,
|
||||||
inject,
|
inject,
|
||||||
it,
|
it,
|
||||||
xit,
|
xit,
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||||
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
import {StringMapWrapper} from '../../src/facade/collection';
|
||||||
|
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||||
import {NgStyle} from 'angular2/src/common/directives/ng_style';
|
import {NgStyle} from '@angular/common/src/directives/ng_style';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('binding to CSS styles', () => {
|
describe('binding to CSS styles', () => {
|
||||||
|
@ -32,7 +31,7 @@ export function main() {
|
||||||
.createAsync(TestComponent)
|
.createAsync(TestComponent)
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
||||||
.toEqual('40px');
|
.toEqual('40px');
|
||||||
|
|
||||||
async.done();
|
async.done();
|
||||||
|
@ -50,13 +49,13 @@ export function main() {
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.expr = {'max-width': '40px'};
|
fixture.debugElement.componentInstance.expr = {'max-width': '40px'};
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
||||||
.toEqual('40px');
|
.toEqual('40px');
|
||||||
|
|
||||||
expr = fixture.debugElement.componentInstance.expr;
|
expr = fixture.debugElement.componentInstance.expr;
|
||||||
expr['max-width'] = '30%';
|
expr['max-width'] = '30%';
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
||||||
.toEqual('30%');
|
.toEqual('30%');
|
||||||
|
|
||||||
async.done();
|
async.done();
|
||||||
|
@ -72,12 +71,12 @@ export function main() {
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.expr = {'max-width': '40px'};
|
fixture.debugElement.componentInstance.expr = {'max-width': '40px'};
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
||||||
.toEqual('40px');
|
.toEqual('40px');
|
||||||
|
|
||||||
StringMapWrapper.delete(fixture.debugElement.componentInstance.expr, 'max-width');
|
StringMapWrapper.delete(fixture.debugElement.componentInstance.expr, 'max-width');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
||||||
.toEqual('');
|
.toEqual('');
|
||||||
|
|
||||||
async.done();
|
async.done();
|
||||||
|
@ -93,16 +92,16 @@ export function main() {
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.expr = {'max-width': '40px'};
|
fixture.debugElement.componentInstance.expr = {'max-width': '40px'};
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
||||||
.toEqual('40px');
|
.toEqual('40px');
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'font-size'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'font-size'))
|
||||||
.toEqual('12px');
|
.toEqual('12px');
|
||||||
|
|
||||||
StringMapWrapper.delete(fixture.debugElement.componentInstance.expr, 'max-width');
|
StringMapWrapper.delete(fixture.debugElement.componentInstance.expr, 'max-width');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
||||||
.toEqual('');
|
.toEqual('');
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'font-size'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'font-size'))
|
||||||
.toEqual('12px');
|
.toEqual('12px');
|
||||||
|
|
||||||
async.done();
|
async.done();
|
||||||
|
@ -118,17 +117,17 @@ export function main() {
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.expr = {'max-width': '40px'};
|
fixture.debugElement.componentInstance.expr = {'max-width': '40px'};
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
||||||
.toEqual('40px');
|
.toEqual('40px');
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'font-size'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'font-size'))
|
||||||
.toEqual('12px');
|
.toEqual('12px');
|
||||||
|
|
||||||
StringMapWrapper.delete(fixture.debugElement.componentInstance.expr, 'max-width');
|
StringMapWrapper.delete(fixture.debugElement.componentInstance.expr, 'max-width');
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'font-size'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'font-size'))
|
||||||
.toEqual('12px');
|
.toEqual('12px');
|
||||||
|
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(DOM.getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
expect(getDOM().getStyle(fixture.debugElement.children[0].nativeElement, 'max-width'))
|
||||||
.toEqual('');
|
.toEqual('');
|
||||||
|
|
||||||
async.done();
|
async.done();
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
import {
|
import {
|
||||||
AsyncTestCompleter,
|
|
||||||
TestComponentBuilder,
|
|
||||||
beforeEach,
|
beforeEach,
|
||||||
ddescribe,
|
ddescribe,
|
||||||
describe,
|
describe,
|
||||||
el,
|
|
||||||
expect,
|
expect,
|
||||||
iit,
|
iit,
|
||||||
inject,
|
inject,
|
||||||
it,
|
it,
|
||||||
xit,
|
xit,
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
|
import {Component} from '@angular/core';
|
||||||
|
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||||
|
|
||||||
import {Component} from 'angular2/core';
|
import {NgSwitch, NgSwitchWhen, NgSwitchDefault} from '@angular/common';
|
||||||
|
|
||||||
import {NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/src/common/directives/ng_switch';
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('switch', () => {
|
describe('switch', () => {
|
||||||
|
|
|
@ -1,20 +1,17 @@
|
||||||
import {
|
import {
|
||||||
AsyncTestCompleter,
|
|
||||||
TestComponentBuilder,
|
|
||||||
beforeEach,
|
beforeEach,
|
||||||
ddescribe,
|
ddescribe,
|
||||||
describe,
|
describe,
|
||||||
el,
|
|
||||||
expect,
|
expect,
|
||||||
iit,
|
iit,
|
||||||
inject,
|
inject,
|
||||||
it,
|
it,
|
||||||
xit,
|
xit,
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||||
import {Component, Directive, TemplateRef, ContentChildren, QueryList} from 'angular2/core';
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
|
import {Component, Directive, TemplateRef, ContentChildren, QueryList} from '@angular/core';
|
||||||
import {NgTemplateOutlet} from 'angular2/src/common/directives/ng_template_outlet';
|
import {NgTemplateOutlet} from '@angular/common';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('insert', () => {
|
describe('insert', () => {
|
||||||
|
|
|
@ -1,19 +1,18 @@
|
||||||
import {
|
import {
|
||||||
AsyncTestCompleter,
|
|
||||||
TestComponentBuilder,
|
|
||||||
beforeEach,
|
beforeEach,
|
||||||
ddescribe,
|
ddescribe,
|
||||||
describe,
|
describe,
|
||||||
el,
|
|
||||||
expect,
|
expect,
|
||||||
iit,
|
iit,
|
||||||
inject,
|
inject,
|
||||||
it,
|
it,
|
||||||
xit,
|
xit,
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||||
import {Component, Directive} from 'angular2/core';
|
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||||
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
import {Component, Directive} from '@angular/core';
|
||||||
|
import {ElementRef} from '@angular/core/src/linker/element_ref';
|
||||||
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('non-bindable', () => {
|
describe('non-bindable', () => {
|
||||||
|
@ -37,10 +36,10 @@ export function main() {
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
// We must use DOM.querySelector instead of fixture.query here
|
// We must use getDOM().querySelector instead of fixture.query here
|
||||||
// since the elements inside are not compiled.
|
// since the elements inside are not compiled.
|
||||||
var span = DOM.querySelector(fixture.debugElement.nativeElement, '#child');
|
var span = getDOM().querySelector(fixture.debugElement.nativeElement, '#child');
|
||||||
expect(DOM.hasClass(span, 'compiled')).toBeFalsy();
|
expect(getDOM().hasClass(span, 'compiled')).toBeFalsy();
|
||||||
async.done();
|
async.done();
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
@ -52,8 +51,8 @@ export function main() {
|
||||||
.createAsync(TestComponent)
|
.createAsync(TestComponent)
|
||||||
.then((fixture) => {
|
.then((fixture) => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
var span = DOM.querySelector(fixture.debugElement.nativeElement, '#child');
|
var span = getDOM().querySelector(fixture.debugElement.nativeElement, '#child');
|
||||||
expect(DOM.hasClass(span, 'compiled')).toBeTruthy();
|
expect(getDOM().hasClass(span, 'compiled')).toBeTruthy();
|
||||||
async.done();
|
async.done();
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
@ -62,7 +61,7 @@ export function main() {
|
||||||
|
|
||||||
@Directive({selector: '[test-dec]'})
|
@Directive({selector: '[test-dec]'})
|
||||||
class TestDirective {
|
class TestDirective {
|
||||||
constructor(el: ElementRef) { DOM.addClass(el.nativeElement, 'compiled'); }
|
constructor(el: ElementRef) { getDOM().addClass(el.nativeElement, 'compiled'); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({selector: 'test-cmp', directives: [TestDirective], template: ''})
|
@Component({selector: 'test-cmp', directives: [TestDirective], template: ''})
|
||||||
|
|
|
@ -1,19 +1,21 @@
|
||||||
import {
|
import {
|
||||||
ddescribe,
|
ddescribe,
|
||||||
describe,
|
describe,
|
||||||
fakeAsync,
|
|
||||||
flushMicrotasks,
|
|
||||||
it,
|
it,
|
||||||
iit,
|
iit,
|
||||||
xit,
|
xit,
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach,
|
afterEach,
|
||||||
el,
|
inject
|
||||||
AsyncTestCompleter,
|
} from '@angular/core/testing/testing_internal';
|
||||||
inject,
|
|
||||||
tick
|
import {
|
||||||
} from 'angular2/testing_internal';
|
fakeAsync,
|
||||||
|
flushMicrotasks,
|
||||||
|
Log,
|
||||||
|
tick,
|
||||||
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import {SpyNgControl, SpyValueAccessor} from '../spies';
|
import {SpyNgControl, SpyValueAccessor} from '../spies';
|
||||||
|
|
||||||
|
@ -33,13 +35,13 @@ import {
|
||||||
CheckboxControlValueAccessor,
|
CheckboxControlValueAccessor,
|
||||||
SelectControlValueAccessor,
|
SelectControlValueAccessor,
|
||||||
Validator
|
Validator
|
||||||
} from 'angular2/common';
|
} from '@angular/common';
|
||||||
|
|
||||||
|
|
||||||
import {selectValueAccessor, composeValidators} from 'angular2/src/common/forms/directives/shared';
|
import {selectValueAccessor, composeValidators} from '@angular/common/src/forms/directives/shared';
|
||||||
import {TimerWrapper} from 'angular2/src/facade/async';
|
import {TimerWrapper} from '../../src/facade/async';
|
||||||
import {PromiseWrapper} from 'angular2/src/facade/promise';
|
import {PromiseWrapper} from '../../src/facade/promise';
|
||||||
import {SimpleChange} from 'angular2/src/core/change_detection';
|
import {SimpleChange} from '@angular/core/src/change_detection';
|
||||||
|
|
||||||
class DummyControlValueAccessor implements ControlValueAccessor {
|
class DummyControlValueAccessor implements ControlValueAccessor {
|
||||||
writtenValue;
|
writtenValue;
|
||||||
|
@ -69,7 +71,7 @@ function asyncValidator(expected, timeout = 0) {
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("Form Directives", () => {
|
describe("Form Directives", () => {
|
||||||
var defaultAccessor;
|
var defaultAccessor: DefaultValueAccessor;
|
||||||
|
|
||||||
beforeEach(() => { defaultAccessor = new DefaultValueAccessor(null, null); });
|
beforeEach(() => { defaultAccessor = new DefaultValueAccessor(null, null); });
|
||||||
|
|
||||||
|
@ -106,7 +108,7 @@ export function main() {
|
||||||
it("should return custom accessor when provided", () => {
|
it("should return custom accessor when provided", () => {
|
||||||
var customAccessor = new SpyValueAccessor();
|
var customAccessor = new SpyValueAccessor();
|
||||||
var checkboxAccessor = new CheckboxControlValueAccessor(null, null);
|
var checkboxAccessor = new CheckboxControlValueAccessor(null, null);
|
||||||
expect(selectValueAccessor(dir, [defaultAccessor, customAccessor, checkboxAccessor]))
|
expect(selectValueAccessor(dir, <any>[defaultAccessor, customAccessor, checkboxAccessor]))
|
||||||
.toEqual(customAccessor);
|
.toEqual(customAccessor);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,10 @@ import {
|
||||||
xit,
|
xit,
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach,
|
afterEach
|
||||||
el
|
} from '@angular/core/testing/testing_internal';
|
||||||
} from 'angular2/testing_internal';
|
import {Control, FormBuilder} from '@angular/common';
|
||||||
import {Control, FormBuilder} from 'angular2/common';
|
import {PromiseWrapper} from '../../src/facade/promise';
|
||||||
import {PromiseWrapper} from 'angular2/src/facade/promise';
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
function syncValidator(_) { return null; }
|
function syncValidator(_) { return null; }
|
||||||
|
|
|
@ -1,33 +1,24 @@
|
||||||
|
import {Component, Directive, Output, EventEmitter} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
Component,
|
|
||||||
Directive,
|
|
||||||
Output,
|
|
||||||
EventEmitter,
|
|
||||||
Provider,
|
|
||||||
forwardRef,
|
|
||||||
Input
|
|
||||||
} from 'angular2/core';
|
|
||||||
import {
|
|
||||||
ComponentFixture,
|
|
||||||
afterEach,
|
afterEach,
|
||||||
AsyncTestCompleter,
|
|
||||||
TestComponentBuilder,
|
|
||||||
beforeEach,
|
beforeEach,
|
||||||
ddescribe,
|
ddescribe,
|
||||||
describe,
|
describe,
|
||||||
dispatchEvent,
|
|
||||||
fakeAsync,
|
|
||||||
tick,
|
|
||||||
flushMicrotasks,
|
|
||||||
expect,
|
expect,
|
||||||
it,
|
it,
|
||||||
inject,
|
inject,
|
||||||
iit,
|
iit,
|
||||||
xit,
|
xit
|
||||||
browserDetection
|
} from '@angular/core/testing/testing_internal';
|
||||||
} from 'angular2/testing_internal';
|
import {
|
||||||
|
fakeAsync,
|
||||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
tick,
|
||||||
|
flushMicrotasks
|
||||||
|
} from '@angular/core/testing';
|
||||||
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
|
import {TestComponentBuilder} from '@angular/compiler/testing';
|
||||||
|
import {ComponentFixture} from '@angular/compiler/testing';
|
||||||
|
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||||
import {
|
import {
|
||||||
Control,
|
Control,
|
||||||
ControlGroup,
|
ControlGroup,
|
||||||
|
@ -42,11 +33,14 @@ import {
|
||||||
Validators,
|
Validators,
|
||||||
Validator,
|
Validator,
|
||||||
RadioButtonState
|
RadioButtonState
|
||||||
} from 'angular2/common';
|
} from '@angular/common';
|
||||||
import {By} from 'angular2/platform/browser';
|
import {Provider, forwardRef, Input} from '@angular/core';
|
||||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
import {By} from '@angular/platform-browser/src/dom/debug/by';
|
||||||
import {ObservableWrapper, TimerWrapper} from 'angular2/src/facade/async';
|
import {ListWrapper} from '../../src/facade/collection';
|
||||||
import {PromiseWrapper} from "angular2/src/facade/promise";
|
import {ObservableWrapper, TimerWrapper} from '../../src/facade/async';
|
||||||
|
import {PromiseWrapper} from '../../src/facade/promise';
|
||||||
|
import {browserDetection} from '@angular/platform-browser/testing';
|
||||||
|
import {dispatchEvent} from '@angular/platform-browser/testing';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("integration tests", () => {
|
describe("integration tests", () => {
|
||||||
|
@ -57,7 +51,7 @@ export function main() {
|
||||||
<input type="text" ngControl="login">
|
<input type="text" ngControl="login">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"login": new Control("loginValue")});
|
new ControlGroup({"login": new Control("loginValue")});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -74,7 +68,7 @@ export function main() {
|
||||||
<input type="text" ngControl="login">
|
<input type="text" ngControl="login">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
expect(() => fixture.detectChanges())
|
expect(() => fixture.detectChanges())
|
||||||
.toThrowError(new RegExp(`ngFormModel expects a form. Please pass one in.`));
|
.toThrowError(new RegExp(`ngFormModel expects a form. Please pass one in.`));
|
||||||
async.done();
|
async.done();
|
||||||
|
@ -89,7 +83,7 @@ export function main() {
|
||||||
<input type="text" ngControl="login">
|
<input type="text" ngControl="login">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
var input = fixture.debugElement.query(By.css("input"));
|
var input = fixture.debugElement.query(By.css("input"));
|
||||||
|
@ -110,7 +104,7 @@ export function main() {
|
||||||
<input type="text" ngControl="login">
|
<input type="text" ngControl="login">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
var input = fixture.debugElement.query(By.css("input"));
|
var input = fixture.debugElement.query(By.css("input"));
|
||||||
|
@ -132,7 +126,7 @@ export function main() {
|
||||||
<span>{{name}}</span>
|
<span>{{name}}</span>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.form = new ControlGroup({});
|
fixture.debugElement.componentInstance.form = new ControlGroup({});
|
||||||
|
@ -153,7 +147,7 @@ export function main() {
|
||||||
|
|
||||||
var t = `<div><input type="text" [ngFormControl]="form"></div>`;
|
var t = `<div><input type="text" [ngFormControl]="form"></div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = control;
|
fixture.debugElement.componentInstance.form = control;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@ -174,7 +168,7 @@ export function main() {
|
||||||
<input type="text" ngControl="login">
|
<input type="text" ngControl="login">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"login": new Control("oldValue")});
|
new ControlGroup({"login": new Control("oldValue")});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -198,7 +192,7 @@ export function main() {
|
||||||
<input type="text" ngControl="login">
|
<input type="text" ngControl="login">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@ -221,7 +215,7 @@ export function main() {
|
||||||
<input type="text" ngControl="login">
|
<input type="text" ngControl="login">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@ -243,7 +237,7 @@ export function main() {
|
||||||
<input type="text" ngControl="text">
|
<input type="text" ngControl="text">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"text": new Control("old")});
|
new ControlGroup({"text": new Control("old")});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -265,7 +259,7 @@ export function main() {
|
||||||
<input ngControl="text">
|
<input ngControl="text">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"text": new Control("old")});
|
new ControlGroup({"text": new Control("old")});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -286,7 +280,7 @@ export function main() {
|
||||||
<textarea ngControl="text"></textarea>
|
<textarea ngControl="text"></textarea>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"text": new Control('old')});
|
new ControlGroup({"text": new Control('old')});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -308,7 +302,7 @@ export function main() {
|
||||||
<input type="checkbox" ngControl="checkbox">
|
<input type="checkbox" ngControl="checkbox">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"checkbox": new Control(true)});
|
new ControlGroup({"checkbox": new Control(true)});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -330,7 +324,7 @@ export function main() {
|
||||||
<input type="number" ngControl="num">
|
<input type="number" ngControl="num">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"num": new Control(10)});
|
new ControlGroup({"num": new Control(10)});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -352,7 +346,7 @@ export function main() {
|
||||||
<input type="number" ngControl="num" required>
|
<input type="number" ngControl="num" required>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"num": new Control(10)});
|
new ControlGroup({"num": new Control(10)});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -381,7 +375,7 @@ export function main() {
|
||||||
<input type="number" ngControl="num" [(ngModel)]="data">
|
<input type="number" ngControl="num" [(ngModel)]="data">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.debugElement.componentInstance.data = null;
|
fixture.debugElement.componentInstance.data = null;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -400,7 +394,7 @@ export function main() {
|
||||||
<input type="radio" ngControl="foodFish" name="food">
|
<input type="radio" ngControl="foodFish" name="food">
|
||||||
</form>`;
|
</form>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = new ControlGroup({
|
fixture.debugElement.componentInstance.form = new ControlGroup({
|
||||||
"foodChicken": new Control(new RadioButtonState(false, 'chicken')),
|
"foodChicken": new Control(new RadioButtonState(false, 'chicken')),
|
||||||
"foodFish": new Control(new RadioButtonState(true, 'fish'))
|
"foodFish": new Control(new RadioButtonState(true, 'fish'))
|
||||||
|
@ -429,7 +423,7 @@ export function main() {
|
||||||
<option value="NYC"></option>
|
<option value="NYC"></option>
|
||||||
</select>`;
|
</select>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
var select = fixture.debugElement.query(By.css("select"));
|
var select = fixture.debugElement.query(By.css("select"));
|
||||||
|
@ -450,7 +444,7 @@ export function main() {
|
||||||
</option>
|
</option>
|
||||||
</select>`;
|
</select>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
var testComp = fixture.debugElement.componentInstance;
|
var testComp = fixture.debugElement.componentInstance;
|
||||||
testComp.list = [{"id": "0", "name": "SF"}, {"id": "1", "name": "NYC"}];
|
testComp.list = [{"id": "0", "name": "SF"}, {"id": "1", "name": "NYC"}];
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -475,7 +469,7 @@ export function main() {
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"city": new Control("SF")});
|
new ControlGroup({"city": new Control("SF")});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -505,7 +499,7 @@ export function main() {
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
var fixture;
|
var fixture;
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((compFixture) => fixture =
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((compFixture) => fixture =
|
||||||
compFixture);
|
compFixture);
|
||||||
tick();
|
tick();
|
||||||
|
|
||||||
|
@ -529,7 +523,7 @@ export function main() {
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
|
|
||||||
var testComp = fixture.debugElement.componentInstance;
|
var testComp = fixture.debugElement.componentInstance;
|
||||||
testComp.list = [{"name": "SF"}, {"name": "NYC"}, {"name": "Buffalo"}];
|
testComp.list = [{"name": "SF"}, {"name": "NYC"}, {"name": "Buffalo"}];
|
||||||
|
@ -561,9 +555,9 @@ export function main() {
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
|
|
||||||
var testComp: MyComp = fixture.debugElement.componentInstance;
|
var testComp: MyComp8 = fixture.debugElement.componentInstance;
|
||||||
testComp.list = [{"name": "SF"}, {"name": "NYC"}];
|
testComp.list = [{"name": "SF"}, {"name": "NYC"}];
|
||||||
testComp.selectedCity = testComp.list[1];
|
testComp.selectedCity = testComp.list[1];
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -588,9 +582,9 @@ export function main() {
|
||||||
<option *ngFor="let c of list" [ngValue]="c">{{c}}</option>
|
<option *ngFor="let c of list" [ngValue]="c">{{c}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
|
|
||||||
var testComp: MyComp = fixture.debugElement.componentInstance;
|
var testComp: MyComp8 = fixture.debugElement.componentInstance;
|
||||||
testComp.list = [{"name": "SF"}, {"name": "NYC"}];
|
testComp.list = [{"name": "SF"}, {"name": "NYC"}];
|
||||||
testComp.selectedCity = testComp.list[1];
|
testComp.selectedCity = testComp.list[1];
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -615,7 +609,7 @@ export function main() {
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
|
|
||||||
var testComp = fixture.debugElement.componentInstance;
|
var testComp = fixture.debugElement.componentInstance;
|
||||||
|
|
||||||
|
@ -645,7 +639,7 @@ export function main() {
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
|
|
||||||
var testComp = fixture.debugElement.componentInstance;
|
var testComp = fixture.debugElement.componentInstance;
|
||||||
|
|
||||||
|
@ -674,7 +668,7 @@ export function main() {
|
||||||
</select>
|
</select>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
|
|
||||||
var testComp = fixture.debugElement.componentInstance;
|
var testComp = fixture.debugElement.componentInstance;
|
||||||
testComp.list = [{"name": "SF"}, {"name": "NYC"}, {"name": "NYC"}];
|
testComp.list = [{"name": "SF"}, {"name": "NYC"}, {"name": "NYC"}];
|
||||||
|
@ -700,7 +694,7 @@ export function main() {
|
||||||
<input type="text" ngControl="name" wrapped-value>
|
<input type="text" ngControl="name" wrapped-value>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"name": new Control("aa")});
|
new ControlGroup({"name": new Control("aa")});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -721,7 +715,7 @@ export function main() {
|
||||||
<my-input ngControl="name"></my-input>
|
<my-input ngControl="name"></my-input>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form =
|
fixture.debugElement.componentInstance.form =
|
||||||
new ControlGroup({"name": new Control("aa")});
|
new ControlGroup({"name": new Control("aa")});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -751,7 +745,7 @@ export function main() {
|
||||||
<input type="text" ngControl="max" maxlength="3">
|
<input type="text" ngControl="max" maxlength="3">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@ -794,7 +788,7 @@ export function main() {
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
var rootTC;
|
var rootTC;
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((root) => rootTC = root);
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((root) => rootTC = root);
|
||||||
tick();
|
tick();
|
||||||
|
|
||||||
rootTC.debugElement.componentInstance.form = form;
|
rootTC.debugElement.componentInstance.form = form;
|
||||||
|
@ -822,7 +816,7 @@ export function main() {
|
||||||
<input type="text" ngControl="login">
|
<input type="text" ngControl="login">
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(form.valid).toEqual(true);
|
expect(form.valid).toEqual(true);
|
||||||
|
@ -847,7 +841,7 @@ export function main() {
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
var fixture;
|
var fixture;
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((root) => fixture = root);
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((root) => fixture = root);
|
||||||
tick();
|
tick();
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
|
@ -884,7 +878,7 @@ export function main() {
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@ -905,7 +899,7 @@ export function main() {
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
var input = fixture.debugElement.query(By.css("input"));
|
var input = fixture.debugElement.query(By.css("input"));
|
||||||
|
@ -926,7 +920,7 @@ export function main() {
|
||||||
var t =
|
var t =
|
||||||
`<div [ngFormModel]="form"><input type="text" ngControl="name" [(ngModel)]="name"></div>`;
|
`<div [ngFormModel]="form"><input type="text" ngControl="name" [(ngModel)]="name"></div>`;
|
||||||
|
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.name = 'oldValue';
|
fixture.debugElement.componentInstance.name = 'oldValue';
|
||||||
|
@ -949,7 +943,7 @@ export function main() {
|
||||||
|
|
||||||
var t = `<div><input type="text" [ngFormControl]="form" [(ngModel)]="name"></div>`;
|
var t = `<div><input type="text" [ngFormControl]="form" [(ngModel)]="name"></div>`;
|
||||||
|
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.debugElement.componentInstance.name = "oldValue";
|
fixture.debugElement.componentInstance.name = "oldValue";
|
||||||
|
@ -974,7 +968,7 @@ export function main() {
|
||||||
</div>
|
</div>
|
||||||
</form>`;
|
</form>`;
|
||||||
|
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
fixture.debugElement.componentInstance.name = null;
|
fixture.debugElement.componentInstance.name = null;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -992,7 +986,7 @@ export function main() {
|
||||||
fakeAsync(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
fakeAsync(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||||
var t = `<div><form (ngSubmit)="name='updated'"></form></div>`;
|
var t = `<div><form (ngSubmit)="name='updated'"></form></div>`;
|
||||||
|
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
fixture.debugElement.componentInstance.name = 'old';
|
fixture.debugElement.componentInstance.name = 'old';
|
||||||
var form = fixture.debugElement.query(By.css("form"));
|
var form = fixture.debugElement.query(By.css("form"));
|
||||||
|
@ -1008,7 +1002,7 @@ export function main() {
|
||||||
var t = `<form ngNoForm>
|
var t = `<form ngNoForm>
|
||||||
</form>`;
|
</form>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.name = null;
|
fixture.debugElement.componentInstance.name = null;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@ -1025,7 +1019,7 @@ export function main() {
|
||||||
</div>
|
</div>
|
||||||
</form>`;
|
</form>`;
|
||||||
|
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
fixture.debugElement.componentInstance.name = 'show';
|
fixture.debugElement.componentInstance.name = 'show';
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -1051,7 +1045,7 @@ export function main() {
|
||||||
</form>`;
|
</form>`;
|
||||||
|
|
||||||
|
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
fixture.debugElement.componentInstance.name = 'show';
|
fixture.debugElement.componentInstance.name = 'show';
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -1073,7 +1067,7 @@ export function main() {
|
||||||
<input type="text" ngControl="name" [(ngModel)]="name">
|
<input type="text" ngControl="name" [(ngModel)]="name">
|
||||||
</form>`;
|
</form>`;
|
||||||
|
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
fixture.debugElement.componentInstance.name = "oldValue";
|
fixture.debugElement.componentInstance.name = "oldValue";
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -1094,7 +1088,7 @@ export function main() {
|
||||||
fakeAsync(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
fakeAsync(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||||
var t = `<div><input type="text" [(ngModel)]="name"></div>`;
|
var t = `<div><input type="text" [(ngModel)]="name"></div>`;
|
||||||
|
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
fixture.debugElement.componentInstance.name = "oldValue";
|
fixture.debugElement.componentInstance.name = "oldValue";
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -1121,7 +1115,7 @@ export function main() {
|
||||||
<input type="radio" name="food" ngControl="fish" [(ngModel)]="data['fish2']">
|
<input type="radio" name="food" ngControl="fish" [(ngModel)]="data['fish2']">
|
||||||
</form>`;
|
</form>`;
|
||||||
|
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
|
|
||||||
fixture.debugElement.componentInstance.data = {
|
fixture.debugElement.componentInstance.data = {
|
||||||
|
@ -1157,7 +1151,7 @@ export function main() {
|
||||||
|
|
||||||
var t = `<div><input type="text" [ngFormControl]="form"></div>`;
|
var t = `<div><input type="text" [ngFormControl]="form"></div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@ -1184,7 +1178,7 @@ export function main() {
|
||||||
|
|
||||||
var t = `<form [ngFormModel]="form"><input type="text" ngControl="name"></form>`;
|
var t = `<form [ngFormModel]="form"><input type="text" ngControl="name"></form>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@ -1209,7 +1203,7 @@ export function main() {
|
||||||
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
|
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
|
||||||
var t = `<div><input [(ngModel)]="name" required></div>`;
|
var t = `<div><input [(ngModel)]="name" required></div>`;
|
||||||
|
|
||||||
tcb.overrideTemplate(MyComp, t).createAsync(MyComp).then((fixture) => {
|
tcb.overrideTemplate(MyComp8, t).createAsync(MyComp8).then((fixture) => {
|
||||||
fixture.debugElement.componentInstance.name = "";
|
fixture.debugElement.componentInstance.name = "";
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@ -1237,7 +1231,7 @@ export function main() {
|
||||||
var form = new Control("");
|
var form = new Control("");
|
||||||
|
|
||||||
var t = `<div><input type="text" [ngFormControl]="form" [(ngModel)]="name"></div>`;
|
var t = `<div><input type="text" [ngFormControl]="form" [(ngModel)]="name"></div>`;
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
fixture.debugElement.componentInstance.form = form;
|
fixture.debugElement.componentInstance.form = form;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -1245,8 +1239,8 @@ export function main() {
|
||||||
// In Firefox, effective text selection in the real DOM requires an actual focus
|
// In Firefox, effective text selection in the real DOM requires an actual focus
|
||||||
// of the field. This is not an issue in a new HTML document.
|
// of the field. This is not an issue in a new HTML document.
|
||||||
if (browserDetection.isFirefox) {
|
if (browserDetection.isFirefox) {
|
||||||
var fakeDoc = DOM.createHtmlDocument();
|
var fakeDoc = getDOM().createHtmlDocument();
|
||||||
DOM.appendChild(fakeDoc.body, fixture.debugElement.nativeElement);
|
getDOM().appendChild(fakeDoc.body, fixture.debugElement.nativeElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
var input = fixture.debugElement.query(By.css("input")).nativeElement;
|
var input = fixture.debugElement.query(By.css("input")).nativeElement;
|
||||||
|
@ -1264,7 +1258,7 @@ export function main() {
|
||||||
it("should update the view when the model is set back to what used to be in the view",
|
it("should update the view when the model is set back to what used to be in the view",
|
||||||
fakeAsync(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
fakeAsync(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||||
var t = `<input type="text" [(ngModel)]="name">`;
|
var t = `<input type="text" [(ngModel)]="name">`;
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
fixture.debugElement.componentInstance.name = "";
|
fixture.debugElement.componentInstance.name = "";
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -1298,7 +1292,7 @@ export function main() {
|
||||||
// fixed.
|
// fixed.
|
||||||
var t = `<form><div ngControlGroup="x" #x="ngForm">
|
var t = `<form><div ngControlGroup="x" #x="ngForm">
|
||||||
<input type="text" ngControl="test"></div>{{x.valid}}</form>`;
|
<input type="text" ngControl="test"></div>{{x.valid}}</form>`;
|
||||||
let fixture = tcb.overrideTemplate(MyComp, t).createFakeAsync(MyComp);
|
let fixture = tcb.overrideTemplate(MyComp8, t).createFakeAsync(MyComp8);
|
||||||
tick();
|
tick();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
})));
|
})));
|
||||||
|
@ -1394,7 +1388,7 @@ class UniqLoginValidator implements Validator {
|
||||||
UniqLoginValidator
|
UniqLoginValidator
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
class MyComp {
|
class MyComp8 {
|
||||||
form: any;
|
form: any;
|
||||||
name: string;
|
name: string;
|
||||||
data: any;
|
data: any;
|
||||||
|
@ -1404,7 +1398,7 @@ class MyComp {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sortedClassList(el) {
|
function sortedClassList(el) {
|
||||||
var l = DOM.classList(el);
|
var l = getDOM().classList(el);
|
||||||
ListWrapper.sort(l);
|
ListWrapper.sort(l);
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,16 +7,19 @@ import {
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach,
|
afterEach,
|
||||||
el,
|
inject,
|
||||||
AsyncTestCompleter,
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
import {
|
||||||
fakeAsync,
|
fakeAsync,
|
||||||
tick,
|
flushMicrotasks,
|
||||||
inject
|
Log,
|
||||||
} from 'angular2/testing_internal';
|
tick
|
||||||
import {ControlGroup, Control, ControlArray, Validators} from 'angular2/common';
|
} from '@angular/core/testing';
|
||||||
import {IS_DART, isPresent} from 'angular2/src/facade/lang';
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
import {PromiseWrapper} from 'angular2/src/facade/promise';
|
import {ControlGroup, Control, ControlArray, Validators} from '@angular/common';
|
||||||
import {TimerWrapper, ObservableWrapper, EventEmitter} from 'angular2/src/facade/async';
|
import {IS_DART, isPresent} from '../../src/facade/lang';
|
||||||
|
import {PromiseWrapper} from '../../src/facade/promise';
|
||||||
|
import {TimerWrapper, ObservableWrapper, EventEmitter} from '../../src/facade/async';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
function asyncValidator(expected, timeouts = /*@ts2dart_const*/ {}) {
|
function asyncValidator(expected, timeouts = /*@ts2dart_const*/ {}) {
|
||||||
|
|
|
@ -6,14 +6,17 @@ import {
|
||||||
xit,
|
xit,
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach,
|
afterEach
|
||||||
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
import {
|
||||||
fakeAsync,
|
fakeAsync,
|
||||||
tick,
|
flushMicrotasks,
|
||||||
el
|
Log,
|
||||||
} from 'angular2/testing_internal';
|
tick
|
||||||
import {ControlGroup, Control, Validators, AbstractControl, ControlArray} from 'angular2/common';
|
} from '@angular/core/testing';
|
||||||
import {PromiseWrapper} from 'angular2/src/facade/promise';
|
import {ControlGroup, Control, Validators, AbstractControl, ControlArray} from '@angular/common';
|
||||||
import {EventEmitter, ObservableWrapper, TimerWrapper} from 'angular2/src/facade/async';
|
import {PromiseWrapper} from '../../src/facade/promise';
|
||||||
|
import {EventEmitter, ObservableWrapper, TimerWrapper} from '../../src/facade/async';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
function validator(key: string, error: any) {
|
function validator(key: string, error: any) {
|
||||||
|
|
|
@ -7,23 +7,22 @@ import {
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach,
|
afterEach,
|
||||||
AsyncTestCompleter,
|
|
||||||
inject,
|
inject,
|
||||||
browserDetection
|
} from '@angular/core/testing/testing_internal';
|
||||||
} from 'angular2/testing_internal';
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
import {SpyChangeDetectorRef} from '../spies';
|
import {SpyChangeDetectorRef} from '../spies';
|
||||||
|
import {isBlank} from '../../src/facade/lang';
|
||||||
import {isBlank} from 'angular2/src/facade/lang';
|
import {AsyncPipe} from '@angular/common';
|
||||||
import {AsyncPipe} from 'angular2/common';
|
import {WrappedValue} from '@angular/core';
|
||||||
import {WrappedValue} from 'angular2/core';
|
|
||||||
import {
|
import {
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
ObservableWrapper,
|
ObservableWrapper,
|
||||||
PromiseWrapper,
|
PromiseWrapper,
|
||||||
TimerWrapper
|
TimerWrapper
|
||||||
} from 'angular2/src/facade/async';
|
} from '../../src/facade/async';
|
||||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||||
import {PromiseCompleter} from 'angular2/src/facade/promise';
|
import {PromiseCompleter} from '../../src/facade/promise';
|
||||||
|
import {browserDetection} from '@angular/platform-browser/testing';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("AsyncPipe", () => {
|
describe("AsyncPipe", () => {
|
||||||
|
@ -121,7 +120,7 @@ export function main() {
|
||||||
var completer: PromiseCompleter<any>;
|
var completer: PromiseCompleter<any>;
|
||||||
var ref: SpyChangeDetectorRef;
|
var ref: SpyChangeDetectorRef;
|
||||||
// adds longer timers for passing tests in IE
|
// adds longer timers for passing tests in IE
|
||||||
var timer = (!isBlank(DOM) && browserDetection.isIE) ? 50 : 10;
|
var timer = (!isBlank(getDOM()) && browserDetection.isIE) ? 50 : 10;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
completer = PromiseWrapper.completer();
|
completer = PromiseWrapper.completer();
|
||||||
|
|
|
@ -6,13 +6,13 @@ import {
|
||||||
xit,
|
xit,
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach,
|
afterEach
|
||||||
browserDetection
|
} from '@angular/core/testing/testing_internal';
|
||||||
} from 'angular2/testing_internal';
|
import {browserDetection} from '@angular/platform-browser/testing';
|
||||||
|
|
||||||
import {DatePipe} from 'angular2/common';
|
import {DatePipe} from '@angular/common';
|
||||||
import {DateWrapper} from 'angular2/src/facade/lang';
|
import {DateWrapper} from '../../src/facade/lang';
|
||||||
import {PipeResolver} from 'angular2/src/compiler/pipe_resolver';
|
import {PipeResolver} from '@angular/compiler/src/pipe_resolver';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("DatePipe", () => {
|
describe("DatePipe", () => {
|
||||||
|
|
|
@ -7,10 +7,10 @@ import {
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach
|
afterEach
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
import {I18nPluralPipe} from 'angular2/common';
|
import {I18nPluralPipe} from '@angular/common';
|
||||||
import {PipeResolver} from 'angular2/src/compiler/pipe_resolver';
|
import {PipeResolver} from '@angular/compiler/src/pipe_resolver';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("I18nPluralPipe", () => {
|
describe("I18nPluralPipe", () => {
|
||||||
|
|
|
@ -7,10 +7,10 @@ import {
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach
|
afterEach
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
import {I18nSelectPipe} from 'angular2/common';
|
import {I18nSelectPipe} from '@angular/common';
|
||||||
import {PipeResolver} from 'angular2/src/compiler/pipe_resolver';
|
import {PipeResolver} from '@angular/compiler/src/pipe_resolver';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("I18nSelectPipe", () => {
|
describe("I18nSelectPipe", () => {
|
||||||
|
|
|
@ -7,14 +7,14 @@ import {
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach,
|
afterEach,
|
||||||
AsyncTestCompleter,
|
|
||||||
inject,
|
inject,
|
||||||
TestComponentBuilder
|
} from '@angular/core/testing/testing_internal';
|
||||||
} from 'angular2/testing_internal';
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
import {Json, RegExp, NumberWrapper, StringWrapper} from 'angular2/src/facade/lang';
|
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||||
|
import {Json, RegExp, NumberWrapper, StringWrapper} from '../../src/facade/lang';
|
||||||
|
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {JsonPipe} from 'angular2/common';
|
import {JsonPipe} from '@angular/common';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("JsonPipe", () => {
|
describe("JsonPipe", () => {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import {
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach
|
afterEach
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
import {LowerCasePipe} from 'angular2/common';
|
import {LowerCasePipe} from '@angular/common';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("LowerCasePipe", () => {
|
describe("LowerCasePipe", () => {
|
||||||
|
|
|
@ -7,10 +7,10 @@ import {
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach,
|
afterEach,
|
||||||
browserDetection
|
} from '@angular/core/testing/testing_internal';
|
||||||
} from 'angular2/testing_internal';
|
import {browserDetection} from '@angular/platform-browser/testing';
|
||||||
|
|
||||||
import {DecimalPipe, PercentPipe, CurrencyPipe} from 'angular2/common';
|
import {DecimalPipe, PercentPipe, CurrencyPipe} from '@angular/common';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('Number pipes', () => {
|
describe('Number pipes', () => {
|
||||||
|
|
|
@ -7,14 +7,12 @@ import {
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach,
|
afterEach,
|
||||||
browserDetection,
|
|
||||||
inject,
|
inject,
|
||||||
TestComponentBuilder,
|
} from '@angular/core/testing/testing_internal';
|
||||||
AsyncTestCompleter
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
} from 'angular2/testing_internal';
|
|
||||||
|
|
||||||
import {ReplacePipe} from 'angular2/common';
|
import {ReplacePipe} from '@angular/common';
|
||||||
import {RegExpWrapper, StringJoiner} from 'angular2/src/facade/lang';
|
import {RegExpWrapper, StringJoiner} from '../../src/facade/lang';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("ReplacePipe", () => {
|
describe("ReplacePipe", () => {
|
||||||
|
|
|
@ -7,14 +7,15 @@ import {
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach,
|
afterEach,
|
||||||
browserDetection,
|
|
||||||
inject,
|
inject,
|
||||||
TestComponentBuilder,
|
} from '@angular/core/testing/testing_internal';
|
||||||
AsyncTestCompleter
|
import {} from '@angular/core/testing/testing_internal';
|
||||||
} from 'angular2/testing_internal';
|
import {browserDetection} from '@angular/platform-browser/testing';
|
||||||
|
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||||
|
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {SlicePipe} from 'angular2/common';
|
import {SlicePipe} from '@angular/common';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("SlicePipe", () => {
|
describe("SlicePipe", () => {
|
||||||
|
|
|
@ -7,9 +7,8 @@ import {
|
||||||
expect,
|
expect,
|
||||||
beforeEach,
|
beforeEach,
|
||||||
afterEach
|
afterEach
|
||||||
} from 'angular2/testing_internal';
|
} from '@angular/core/testing/testing_internal';
|
||||||
|
import {UpperCasePipe} from '@angular/common';
|
||||||
import {UpperCasePipe} from 'angular2/common';
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("UpperCasePipe", () => {
|
describe("UpperCasePipe", () => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {ChangeDetectorRef} from 'angular2/src/core/change_detection/change_detector_ref';
|
import {ChangeDetectorRef} from '@angular/core/src/change_detection/change_detector_ref';
|
||||||
import {SpyObject, proxy} from 'angular2/testing_internal';
|
import {SpyObject, proxy} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
export class SpyChangeDetectorRef extends SpyObject {
|
export class SpyChangeDetectorRef extends SpyObject {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -10,4 +10,6 @@ export class SpyChangeDetectorRef extends SpyObject {
|
||||||
|
|
||||||
export class SpyNgControl extends SpyObject {}
|
export class SpyNgControl extends SpyObject {}
|
||||||
|
|
||||||
export class SpyValueAccessor extends SpyObject {}
|
export class SpyValueAccessor extends SpyObject {
|
||||||
|
writeValue: any;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
export {MockLocationStrategy} from './testing/mock_location_strategy';
|
||||||
|
export {SpyLocation} from './testing/location_mock';
|
|
@ -1,7 +1,6 @@
|
||||||
import {Injectable} from 'angular2/src/core/di';
|
import {Injectable, EventEmitter} from '@angular/core';
|
||||||
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
import {ObservableWrapper} from '../src/facade/async';
|
||||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
import {Location} from '../index';
|
||||||
import {Location} from 'angular2/platform/common';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A spy for {@link Location} that allows tests to fire simulated location events.
|
* A spy for {@link Location} that allows tests to fire simulated location events.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {Injectable} from 'angular2/src/core/di';
|
import {Injectable} from '@angular/core';
|
||||||
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
import {EventEmitter, ObservableWrapper} from '../src/facade/async';
|
||||||
import {LocationStrategy} from 'angular2/platform/common';
|
import {LocationStrategy} from '../index';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": ".",
|
||||||
|
"declaration": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"module": "es2015",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"outDir": "../../../dist/packages-dist/common/esm",
|
||||||
|
"paths": {
|
||||||
|
"@angular/core": ["../../../dist/packages-dist/core"]
|
||||||
|
},
|
||||||
|
"rootDir": ".",
|
||||||
|
"sourceMap": true,
|
||||||
|
"sourceRoot": ".",
|
||||||
|
"target": "es2015"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.ts",
|
||||||
|
"testing.ts",
|
||||||
|
"../../../node_modules/zone.js/dist/zone.js.d.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": ".",
|
||||||
|
"declaration": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"module": "commonjs",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"outDir": "../../../dist/packages-dist/common/",
|
||||||
|
"paths": {
|
||||||
|
"@angular/core": ["../../../dist/packages-dist/core/"]
|
||||||
|
},
|
||||||
|
"rootDir": ".",
|
||||||
|
"sourceMap": true,
|
||||||
|
"sourceRoot": ".",
|
||||||
|
"target": "es5"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.ts",
|
||||||
|
"testing.ts",
|
||||||
|
"../typings/es6-collections/es6-collections.d.ts",
|
||||||
|
"../typings/es6-promise/es6-promise.d.ts",
|
||||||
|
"../manual_typings/globals.d.ts",
|
||||||
|
"../../../node_modules/zone.js/dist/zone.js.d.ts"
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
|
@ -3,9 +3,8 @@
|
||||||
* @description
|
* @description
|
||||||
* Starting point to import all compiler APIs.
|
* Starting point to import all compiler APIs.
|
||||||
*/
|
*/
|
||||||
|
export {ElementSchemaRegistry} from './src/schema/element_schema_registry';
|
||||||
export {
|
export {
|
||||||
PLATFORM_DIRECTIVES,
|
|
||||||
PLATFORM_PIPES,
|
|
||||||
COMPILER_PROVIDERS,
|
COMPILER_PROVIDERS,
|
||||||
TEMPLATE_TRANSFORMS,
|
TEMPLATE_TRANSFORMS,
|
||||||
CompilerConfig,
|
CompilerConfig,
|
||||||
|
@ -32,6 +31,7 @@ export {
|
||||||
CompileTemplateMetadata,
|
CompileTemplateMetadata,
|
||||||
CompileDirectiveMetadata,
|
CompileDirectiveMetadata,
|
||||||
CompilePipeMetadata
|
CompilePipeMetadata
|
||||||
} from 'angular2/src/compiler/compiler';
|
} from './src/compiler';
|
||||||
|
|
||||||
export * from 'angular2/src/compiler/template_ast';
|
export * from './src/template_ast';
|
||||||
|
export * from './private_export';
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
export '../core/private_export.dart';
|
|
@ -0,0 +1,52 @@
|
||||||
|
import {__core_private__ as r, __core_private_types__ as t} from '@angular/core';
|
||||||
|
|
||||||
|
export var isDefaultChangeDetectionStrategy: typeof t.isDefaultChangeDetectionStrategy = r.isDefaultChangeDetectionStrategy;
|
||||||
|
export type ChangeDetectorState = t.ChangeDetectorState;
|
||||||
|
export var ChangeDetectorState: typeof t.ChangeDetectorState = r.ChangeDetectorState;
|
||||||
|
export var CHANGE_DETECTION_STRATEGY_VALUES: typeof t.CHANGE_DETECTION_STRATEGY_VALUES = r.CHANGE_DETECTION_STRATEGY_VALUES;
|
||||||
|
export var constructDependencies: typeof t.constructDependencies = r.constructDependencies;
|
||||||
|
export type LifecycleHooks = t.LifecycleHooks;
|
||||||
|
export var LifecycleHooks: typeof t.LifecycleHooks = r.LifecycleHooks;
|
||||||
|
export var LIFECYCLE_HOOKS_VALUES: typeof t.LIFECYCLE_HOOKS_VALUES = r.LIFECYCLE_HOOKS_VALUES;
|
||||||
|
export type ReflectorReader = t.ReflectorReader;
|
||||||
|
export var ReflectorReader: typeof t.ReflectorReader = r.ReflectorReader;
|
||||||
|
export var ReflectorComponentResolver: typeof t.ReflectorComponentResolver = r.ReflectorComponentResolver;
|
||||||
|
export type AppElement = t.AppElement;
|
||||||
|
export var AppElement: typeof t.AppElement = r.AppElement;
|
||||||
|
export var AppView: typeof t.AppView = r.AppView;
|
||||||
|
export type DebugAppView<T> = t.DebugAppView<T>;
|
||||||
|
export var DebugAppView: typeof t.DebugAppView = r.DebugAppView;
|
||||||
|
export type ViewType = t.ViewType;
|
||||||
|
export var ViewType: typeof t.ViewType = r.ViewType;
|
||||||
|
export var MAX_INTERPOLATION_VALUES: typeof t.MAX_INTERPOLATION_VALUES = r.MAX_INTERPOLATION_VALUES;
|
||||||
|
export var checkBinding: typeof t.checkBinding = r.checkBinding;
|
||||||
|
export var flattenNestedViewRenderNodes: typeof t.flattenNestedViewRenderNodes = r.flattenNestedViewRenderNodes;
|
||||||
|
export var interpolate: typeof t.interpolate = r.interpolate;
|
||||||
|
export var ViewUtils: typeof t.ViewUtils = r.ViewUtils;
|
||||||
|
export var VIEW_ENCAPSULATION_VALUES: typeof t.VIEW_ENCAPSULATION_VALUES = r.VIEW_ENCAPSULATION_VALUES;
|
||||||
|
export var DebugContext: typeof t.DebugContext = r.DebugContext;
|
||||||
|
export var StaticNodeDebugInfo: typeof t.StaticNodeDebugInfo = r.StaticNodeDebugInfo;
|
||||||
|
export var devModeEqual: typeof t.devModeEqual = r.devModeEqual;
|
||||||
|
export var uninitialized: typeof t.uninitialized = r.uninitialized;
|
||||||
|
export var ValueUnwrapper: typeof t.ValueUnwrapper = r.ValueUnwrapper;
|
||||||
|
export var TemplateRef_: typeof t.TemplateRef_ = r.TemplateRef_;
|
||||||
|
export type RenderDebugInfo = t.RenderDebugInfo;
|
||||||
|
export var RenderDebugInfo: typeof t.RenderDebugInfo = r.RenderDebugInfo;
|
||||||
|
export var createProvider: typeof t.createProvider = r.createProvider;
|
||||||
|
export var isProviderLiteral: typeof t.isProviderLiteral = r.isProviderLiteral;
|
||||||
|
export var EMPTY_ARRAY: typeof t.EMPTY_ARRAY = r.EMPTY_ARRAY;
|
||||||
|
export var EMPTY_MAP: typeof t.EMPTY_MAP = r.EMPTY_MAP;
|
||||||
|
export var pureProxy1: typeof t.pureProxy1 = r.pureProxy1;
|
||||||
|
export var pureProxy2: typeof t.pureProxy2 = r.pureProxy2;
|
||||||
|
export var pureProxy3: typeof t.pureProxy3 = r.pureProxy3;
|
||||||
|
export var pureProxy4: typeof t.pureProxy4 = r.pureProxy4;
|
||||||
|
export var pureProxy5: typeof t.pureProxy5 = r.pureProxy5;
|
||||||
|
export var pureProxy6: typeof t.pureProxy6 = r.pureProxy6;
|
||||||
|
export var pureProxy7: typeof t.pureProxy7 = r.pureProxy7;
|
||||||
|
export var pureProxy8: typeof t.pureProxy8 = r.pureProxy8;
|
||||||
|
export var pureProxy9: typeof t.pureProxy9 = r.pureProxy9;
|
||||||
|
export var pureProxy10: typeof t.pureProxy10 = r.pureProxy10;
|
||||||
|
export var castByValue: typeof t.castByValue = r.castByValue;
|
||||||
|
export type Console = t.Console;
|
||||||
|
export var Console: typeof t.Console = r.Console;
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './compiler';
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"name": "@angular/compiler",
|
||||||
|
"version": "$$ANGULAR_VERSION$$",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"jsnext:main": "esm/index.js",
|
||||||
|
"typings": "index.d.ts",
|
||||||
|
"author": "angular",
|
||||||
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/core": "$$ANGULAR_VERSION$$"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
export './src/core/change_detection/constants.dart' show SelectorMatcher, CssSelector;
|
|
@ -0,0 +1,9 @@
|
||||||
|
import * as selector from './src/selector';
|
||||||
|
|
||||||
|
export namespace __compiler_private__ {
|
||||||
|
export type SelectorMatcher = selector.SelectorMatcher;
|
||||||
|
export var SelectorMatcher = selector.SelectorMatcher;
|
||||||
|
|
||||||
|
export type CssSelector = selector.CssSelector;
|
||||||
|
export var CssSelector = selector.CssSelector;
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
export default {
|
||||||
|
entry: '../../../dist/packages-dist/compiler/esm/index.js',
|
||||||
|
dest: '../../../dist/packages-dist/compiler/esm/compiler.umd.js',
|
||||||
|
sourceMap: true,
|
||||||
|
format: 'umd',
|
||||||
|
moduleName: 'ng.compiler',
|
||||||
|
globals: {
|
||||||
|
'@angular/core': 'ng.core',
|
||||||
|
'rxjs/Subject': 'Rx',
|
||||||
|
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
|
||||||
|
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
|
||||||
|
'rxjs/Observable': 'Rx'
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
// nodeResolve({ jsnext: true, main: true }),
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
import {isArray, isString, isBlank, assertionsEnabled} from '../facade/lang';
|
import {isArray, isString, isBlank, assertionsEnabled} from '../src/facade/lang';
|
||||||
import {BaseException} from '../facade/exceptions';
|
import {BaseException} from '../src/facade/exceptions';
|
||||||
|
|
||||||
export function assertArrayOfStrings(identifier: string, value: any) {
|
export function assertArrayOfStrings(identifier: string, value: any) {
|
||||||
if (!assertionsEnabled() || isBlank(value)) {
|
if (!assertionsEnabled() || isBlank(value)) {
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||||
|
import {
|
||||||
|
CHANGE_DETECTION_STRATEGY_VALUES,
|
||||||
|
VIEW_ENCAPSULATION_VALUES,
|
||||||
|
LifecycleHooks,
|
||||||
|
LIFECYCLE_HOOKS_VALUES
|
||||||
|
} from '../core_private';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isPresent,
|
isPresent,
|
||||||
isBlank,
|
isBlank,
|
||||||
|
@ -9,24 +17,14 @@ import {
|
||||||
Type,
|
Type,
|
||||||
isString,
|
isString,
|
||||||
RegExpWrapper,
|
RegExpWrapper,
|
||||||
StringWrapper,
|
|
||||||
isArray
|
isArray
|
||||||
} from 'angular2/src/facade/lang';
|
} from '../src/facade/lang';
|
||||||
import {unimplemented, BaseException} from 'angular2/src/facade/exceptions';
|
import {unimplemented, BaseException} from '../src/facade/exceptions';
|
||||||
import {
|
import {
|
||||||
StringMapWrapper,
|
StringMapWrapper,
|
||||||
MapWrapper,
|
} from '../src/facade/collection';
|
||||||
SetWrapper,
|
import {CssSelector} from './selector';
|
||||||
ListWrapper
|
|
||||||
} from 'angular2/src/facade/collection';
|
|
||||||
import {
|
|
||||||
ChangeDetectionStrategy,
|
|
||||||
CHANGE_DETECTION_STRATEGY_VALUES
|
|
||||||
} from 'angular2/src/core/change_detection/change_detection';
|
|
||||||
import {ViewEncapsulation, VIEW_ENCAPSULATION_VALUES} from 'angular2/src/core/metadata/view';
|
|
||||||
import {CssSelector} from 'angular2/src/compiler/selector';
|
|
||||||
import {splitAtColon, sanitizeIdentifier} from './util';
|
import {splitAtColon, sanitizeIdentifier} from './util';
|
||||||
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from 'angular2/src/core/metadata/lifecycle_hooks';
|
|
||||||
import {getUrlScheme} from './url_resolver';
|
import {getUrlScheme} from './url_resolver';
|
||||||
|
|
||||||
// group 1: "property" from "[property]"
|
// group 1: "property" from "[property]"
|
||||||
|
@ -318,9 +316,7 @@ export class CompileTokenMetadata implements CompileMetadataWithIdentifier {
|
||||||
(isPresent(ak) && ak == token2.assetCacheKey);
|
(isPresent(ak) && ak == token2.assetCacheKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
get name(): string {
|
get name(): string { return isPresent(this.value) ? sanitizeIdentifier(this.value) : this.identifier.name; }
|
||||||
return isPresent(this.value) ? sanitizeIdentifier(this.value) : this.identifier.name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CompileTokenMap<VALUE> {
|
export class CompileTokenMap<VALUE> {
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
export {PLATFORM_DIRECTIVES, PLATFORM_PIPES} from 'angular2/src/core/platform_directives_and_pipes';
|
import {ComponentResolver, Type} from '@angular/core';
|
||||||
export * from 'angular2/src/compiler/template_ast';
|
import {assertionsEnabled} from '../src/facade/lang';
|
||||||
export {TEMPLATE_TRANSFORMS} from 'angular2/src/compiler/template_parser';
|
|
||||||
|
export * from './template_ast';
|
||||||
|
export {TEMPLATE_TRANSFORMS} from './template_parser';
|
||||||
export {CompilerConfig, RenderTypes} from './config';
|
export {CompilerConfig, RenderTypes} from './config';
|
||||||
export * from './compile_metadata';
|
export * from './compile_metadata';
|
||||||
export * from './offline_compiler';
|
export * from './offline_compiler';
|
||||||
export {RuntimeCompiler} from './runtime_compiler';
|
export {RuntimeCompiler} from './runtime_compiler';
|
||||||
export * from 'angular2/src/compiler/url_resolver';
|
export * from './url_resolver';
|
||||||
export * from 'angular2/src/compiler/xhr';
|
export * from './xhr';
|
||||||
|
|
||||||
export {ViewResolver} from './view_resolver';
|
export {ViewResolver} from './view_resolver';
|
||||||
export {DirectiveResolver} from './directive_resolver';
|
export {DirectiveResolver} from './directive_resolver';
|
||||||
export {PipeResolver} from './pipe_resolver';
|
export {PipeResolver} from './pipe_resolver';
|
||||||
|
|
||||||
import {assertionsEnabled, Type} from 'angular2/src/facade/lang';
|
import {TemplateParser} from './template_parser';
|
||||||
import {TemplateParser} from 'angular2/src/compiler/template_parser';
|
import {HtmlParser} from './html_parser';
|
||||||
import {HtmlParser} from 'angular2/src/compiler/html_parser';
|
import {DirectiveNormalizer} from './directive_normalizer';
|
||||||
import {DirectiveNormalizer} from 'angular2/src/compiler/directive_normalizer';
|
import {CompileMetadataResolver} from './metadata_resolver';
|
||||||
import {CompileMetadataResolver} from 'angular2/src/compiler/metadata_resolver';
|
import {StyleCompiler} from './style_compiler';
|
||||||
import {StyleCompiler} from 'angular2/src/compiler/style_compiler';
|
import {ViewCompiler} from './view_compiler/view_compiler';
|
||||||
import {ViewCompiler} from 'angular2/src/compiler/view_compiler/view_compiler';
|
|
||||||
import {CompilerConfig} from './config';
|
import {CompilerConfig} from './config';
|
||||||
import {ComponentResolver} from 'angular2/src/core/linker/component_resolver';
|
import {RuntimeCompiler} from './runtime_compiler';
|
||||||
import {RuntimeCompiler} from 'angular2/src/compiler/runtime_compiler';
|
import {ElementSchemaRegistry} from './schema/element_schema_registry';
|
||||||
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
|
import {DomElementSchemaRegistry} from './schema/dom_element_schema_registry';
|
||||||
import {DomElementSchemaRegistry} from 'angular2/src/compiler/schema/dom_element_schema_registry';
|
import {UrlResolver, DEFAULT_PACKAGE_URL_PROVIDER} from './url_resolver';
|
||||||
import {UrlResolver, DEFAULT_PACKAGE_URL_PROVIDER} from 'angular2/src/compiler/url_resolver';
|
|
||||||
import {Parser} from './expression_parser/parser';
|
import {Parser} from './expression_parser/parser';
|
||||||
import {Lexer} from './expression_parser/lexer';
|
import {Lexer} from './expression_parser/lexer';
|
||||||
import {ViewResolver} from './view_resolver';
|
import {ViewResolver} from './view_resolver';
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue