diff --git a/.gitignore b/.gitignore
index f0c8a32616..80f34ea11b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,7 +20,7 @@ _.*
public/docs/xref-*.*
_zip-output
www
-/npm-debug.log
+npm-debug.log
npm-debug.log.*
*.plnkr.html
plnkr.html
diff --git a/README.md b/README.md
index 63a1f5fd53..2ee11b04d9 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,7 @@ For example, all of the TypeScript docs are in `public/docs/ts/latest`, e.g.
If you are only going to work on a specific part of the docs, such as the dev guide, then you can use one of the more specific gulp tasks to only watch those parts of the file system:
* `gulp serve-and-sync` : watch all the local Jade/Sass files, the API source and examples, and the dev guide files
-* `gulp serve-and-sync-api-docs` : watch only the API source and example files
+* `gulp serve-and-sync-api` : watch only the API source and example files
* `gulp serve-and-sync-devguide` : watch only the dev guide files
* `gulp build-and-serve` : watch only the local Jade/Sass files
diff --git a/firebase.json b/firebase.json
index b82585e7f8..957cd5fc28 100644
--- a/firebase.json
+++ b/firebase.json
@@ -57,6 +57,10 @@
{
"source": "/dart",
"destination": "/docs/dart/latest/index.html"
+ },
+ {
+ "source": "/styleguide",
+ "destination": "/docs/ts/latest/guide/style-guide.html"
}
],
"ignore": [
diff --git a/gulpfile.js b/gulpfile.js
index 1476231c6c..448f9afb48 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -109,10 +109,12 @@ gulp.task('run-e2e-tests', function() {
// with the corresponding apps that they should run under. Then run
// each app/spec collection sequentially.
function findAndRunE2eTests(filter) {
+ var lang = (argv.lang || '(ts|js)').toLowerCase();
+ if (lang === 'all') { lang = '(ts|js|dart)'; }
var startTime = new Date().getTime();
// create an output file with header.
var outputFile = path.join(process.cwd(), 'protractor-results.txt');
- var header = "Protractor example results for: " + (new Date()).toLocaleString() + "\n\n";
+ var header = "Protractor example results for " + lang + " on " + (new Date()).toLocaleString() + "\n\n";
if (filter) {
header += ' Filter: ' + filter.toString() + '\n\n';
}
@@ -128,6 +130,10 @@ function findAndRunE2eTests(filter) {
fsExtra.copySync(srcConfig, destConfig);
// get all of the examples under each dir where a pcFilename is found
examplePaths = getExamplePaths(specPath, true);
+ // Filter by language
+ examplePaths = examplePaths.filter(function (fn) {
+ return fn.match('/'+lang+'$') != null;
+ });
if (filter) {
examplePaths = examplePaths.filter(function (fn) {
return fn.match(filter) != null;
@@ -142,7 +148,9 @@ function findAndRunE2eTests(filter) {
var status = { passed: [], failed: [] };
return exeConfigs.reduce(function (promise, combo) {
return promise.then(function () {
- return runE2eTests(combo.examplePath, combo.protractorConfigFilename, outputFile).then(function(ok) {
+ var isDart = combo.examplePath.indexOf('/dart') > -1;
+ var runTests = isDart ? runE2eDartTests : runE2eTsTests;
+ return runTests(combo.examplePath, combo.protractorConfigFilename, outputFile).then(function(ok) {
var arr = ok ? status.passed : status.failed;
arr.push(combo.examplePath);
})
@@ -158,12 +166,16 @@ function findAndRunE2eTests(filter) {
// start the example in appDir; then run protractor with the specified
// fileName; then shut down the example. All protractor output is appended
// to the outputFile.
-function runE2eTests(appDir, protractorConfigFilename, outputFile ) {
+function runE2eTsTests(appDir, protractorConfigFilename, outputFile) {
// start the app
var appRunSpawnInfo = spawnExt('npm',['run','http-server:e2e', '--', '-s' ], { cwd: appDir });
var tscRunSpawnInfo = spawnExt('npm',['run','tsc'], { cwd: appDir });
- return tscRunSpawnInfo.promise.then(function(data) {
+ return runProtractor(tscRunSpawnInfo.promise, appDir, appRunSpawnInfo, protractorConfigFilename, outputFile);
+}
+
+function runProtractor(prepPromise, appDir, appRunSpawnInfo, protractorConfigFilename, outputFile) {
+ return prepPromise.then(function (data) {
// start protractor
var pcFilename = path.resolve(protractorConfigFilename); // need to resolve because we are going to be running from a different dir
var exePath = path.join(process.cwd(), "./node_modules/.bin/");
@@ -175,7 +187,7 @@ function runE2eTests(appDir, protractorConfigFilename, outputFile ) {
// Ugh... proc.kill does not work properly on windows with child processes.
// appRun.proc.kill();
treeKill(appRunSpawnInfo.proc.pid);
- return true;
+ return !data;
}).fail(function(err) {
// Ugh... proc.kill does not work properly on windows with child processes.
// appRun.proc.kill();
@@ -184,19 +196,39 @@ function runE2eTests(appDir, protractorConfigFilename, outputFile ) {
});
}
+// start the server in appDir/build/web; then run protractor with the specified
+// fileName; then shut down the example. All protractor output is appended
+// to the outputFile.
+function runE2eDartTests(appDir, protractorConfigFilename, outputFile) {
+ var deployDir = path.resolve(path.join(appDir, 'build/web'));
+ gutil.log('AppDir for Dart e2e: ' + appDir);
+ gutil.log('Deploying from: ' + deployDir);
+
+ var appRunSpawnInfo = spawnExt('npm', ['run', 'http-server:e2e', '--', deployDir, '-s'], { cwd: EXAMPLES_PATH });
+ if (!appRunSpawnInfo.proc.pid) {
+ gutil.log('http-server failed to launch over ' + deployDir);
+ return false;
+ }
+ var pubUpgradeSpawnInfo = spawnExt('pub', ['upgrade'], { cwd: appDir });
+ var prepPromise = pubUpgradeSpawnInfo.promise.then(function (data) {
+ return spawnExt('pub', ['build'], { cwd: appDir }).promise;
+ });
+ return runProtractor(prepPromise, appDir, appRunSpawnInfo, protractorConfigFilename, outputFile);
+}
+
function reportStatus(status) {
gutil.log('Suites passed:');
status.passed.forEach(function(val) {
gutil.log(' ' + val);
});
- gutil.log('Suites failed:');
- status.failed.forEach(function(val) {
- gutil.log(' ' + val);
- });
-
if (status.failed.length == 0) {
gutil.log('All tests passed');
+ } else {
+ gutil.log('Suites failed:');
+ status.failed.forEach(function (val) {
+ gutil.log(' ' + val);
+ });
}
gutil.log('Elapsed time: ' + status.elapsedTime + ' seconds');
}
@@ -808,7 +840,8 @@ function devGuideExamplesWatch(shredOptions, postShredAction) {
// removed this version because gulp.watch has the same glob issue that dgeni has.
// var excludePattern = '!' + path.join(shredOptions.examplesDir, '**/node_modules/**/*.*');
// gulp.watch([includePattern, excludePattern], {readDelay: 500}, function (event, done) {
- var files = globby.sync( [includePattern], { ignore: [ '**/node_modules/**', '**/_fragments/**']});
+ var files = globby.sync( [includePattern], { ignore: [ '**/node_modules/**', '**/_fragments/**',
+ '**/dart/build/**' ]});
gulp.watch([files], {readDelay: 500}, function (event, done) {
gutil.log('Dev Guide example changed')
gutil.log('Event type: ' + event.type); // added, changed, or deleted
diff --git a/harp.json b/harp.json
index aeeda7f949..5c2478685e 100644
--- a/harp.json
+++ b/harp.json
@@ -290,6 +290,7 @@
"name": "Stephen Fluin",
"picture": "/resources/images/bios/stephenfluin.jpg",
"twitter": "stephenfluin",
+ "website": "https://plus.google.com/+stephenfluin",
"bio": "Stephen is a Developer Advocate working on the Angular team. Before joining Google, he was a Google Expert. Stephen loves to help enterprises use technology more effectively.",
"type": "Google"
},
diff --git a/package.json b/package.json
index 91076fd867..e1a34a4754 100644
--- a/package.json
+++ b/package.json
@@ -17,8 +17,8 @@
},
"licenses": [
{
- "type": "Apache",
- "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+ "type": "MIT",
+ "url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"bugs": {
@@ -34,7 +34,7 @@
"codelyzer": "0.0.18",
"del": "^1.2.0",
"dgeni": "^0.4.0",
- "dgeni-packages": "^0.11.1",
+ "dgeni-packages": "^0.13.0",
"diff": "^2.1.3",
"fs-extra": "^0.24.0",
"glob": "^5.0.14",
diff --git a/public/_data.json b/public/_data.json
index eec7703cf9..db51fd2e0d 100644
--- a/public/_data.json
+++ b/public/_data.json
@@ -47,9 +47,5 @@
"tooling": {
"title": "工具与库"
- },
-
- "all-resources": {
- "title": "资源"
}
}
diff --git a/public/_includes/_hero-home.jade b/public/_includes/_hero-home.jade
index a653da5d4f..6795c124ea 100644
--- a/public/_includes/_hero-home.jade
+++ b/public/_includes/_hero-home.jade
@@ -7,11 +7,3 @@ header(class="background-sky")
h2 点击“译文”可显示/隐藏“原文”,点击“原文”可隐藏自身
-.banner.banner-floaty
- .banner-ng-annoucement
- div(class="banner-text")
- p Watch the ng-conf Live Stream May 4th-6th.
- p 观看 ng-conf 实时视频 May 4th-6th.
- div(class="banner-button")
- a(href="https://www.ng-conf.org/#/extended" target="_blank" class="button md-button") View Live Stream
- a(href="https://www.ng-conf.org/#/extended" target="_blank" class="button md-button") 查看实时视频
diff --git a/public/_includes/_hero.jade b/public/_includes/_hero.jade
index 53bf8fee5d..6e301a0b71 100644
--- a/public/_includes/_hero.jade
+++ b/public/_includes/_hero.jade
@@ -4,6 +4,12 @@
- var capitalize = function capitalize(str) { return str.charAt(0).toUpperCase() + str.slice(1); }
- var useBadges = docType || stability;
+// renamer :: String -> String
+// Renames `Let` and `Var` into `Const`
+- var renamer = function renamer(docType) {
+- return (docType === 'Let' || docType === 'Var') ? 'Const' : docType
+- }
+
if current.path[4] && current.path[3] == 'api'
- var textFormat = 'is-standard-case'
@@ -14,12 +20,15 @@ header(class="hero background-sky")
span(class="badges")
if docType
span(class="status-badge").
- #{capitalize(docType)}
+ #{renamer(capitalize(docType))}
if stability
span(layout="row" class="status-badge")
// badge circle is filled based on stability by matching a css selector in _hero.scss
span(class="status-circle status-#{stability}")
span Stability: #{capitalize(stability)}
+ if security
+ span(class="status-badge security-risk-badge").
+ Security Risk
if subtitle
h2.hero-subtitle.text-subhead #{subtitle}
diff --git a/public/_includes/_scripts-include.jade b/public/_includes/_scripts-include.jade
index 5dd3407ed7..cb70b047e6 100644
--- a/public/_includes/_scripts-include.jade
+++ b/public/_includes/_scripts-include.jade
@@ -12,12 +12,18 @@ script(src="/resources/js/vendor/angular-animate.min.js")
script(src="/resources/js/vendor/angular-aria.min.js")
script(src="/resources/js/vendor/angular-material.min.js")
+
+
+
+
+
script(src="/resources/js/translate.js")
script(src="/resources/js/site.js")
script(src="/resources/js/controllers/app-controller.js")
+script(src="/resources/js/controllers/resources-controller.js")
script(src="/resources/js/directives/cheatsheet.js")
script(src="/resources/js/directives/api-list.js")
script(src="/resources/js/directives/bio.js")
diff --git a/public/_includes/_util-fns.jade b/public/_includes/_util-fns.jade
index 00288b6c6c..42dfe66944 100644
--- a/public/_includes/_util-fns.jade
+++ b/public/_includes/_util-fns.jade
@@ -1,5 +1,56 @@
//- Mixins and associated functions
+//- _docsFor: used to identify the language this version of the docs if for;
+//- Should be one of: 'ts', 'dart' or 'js'. Set in lang specific _util-fns file.
+- var _docsFor = '';
+
+//- Should match `_docsFor`, but in this case provides the full capitalized
+//- name of the language.
+- var _Lang = 'TypeScript';
+
+//- Simple "macros" used via interpolation in text:
+//- e.g., the #{_priv}el variable has an `@Input` #{_decorator}.
+
+//- Use #{_decorator} whereever the word "decorator" is expected, provided it is not
+//- preceded by the article "a". (E.g., will be "annotation" for Dart)
+- var _decorator = 'decorator';
+
+//- Articles (which toggle between 'a' and 'an'). Used for, e.g.,
+//- array vs. list; decorator vs. annotation.
+- var _a = 'a';
+- var _an = 'an';
+
+//- TS arrays vs. Dart lists
+- var _array = 'array';
+//- Deprecate now that we have the articles _a and _an
+- var _an_array = 'an array';
+
+//- Promise vs. Future, etc
+- var _Promise = 'Promise';
+- var _Observable = 'Observable';
+
+//- Location of sample code
+- var _liveLink = 'live link';
+
+
+//- Used to prefix identifiers that are private. In Dart this will be '_'.
+- var _priv = '';
+
+//- Use to conditionally include the block that follows +ifDocsFor(...).
+//- Generally favor use of Jade named blocks instead. ifDocsFor is convenient
+//- for prose that should appear only in one language version.
+mixin ifDocsFor(lang)
+ if _docsFor.toLowerCase() === lang.toLowerCase()
+ block
+
+//- Use to map inlined (prose) TS paths into, say, Dart paths via the
+//- adjustExamplePath transformer function.
+mixin adjExPath(path)
+ if adjustExamplePath
+ | #{adjustExamplePath(path)}
+ else
+ | #{path}
+
mixin includeShared(filePath, region)
- var newPath = translatePath(filePath, region);
!=partial(newPath)
@@ -11,6 +62,7 @@ mixin makeExample(_filePath, region, _title, stylePatterns)
- var frag = getFrag(filePath, region);
- var defaultFormat = frag.split('\n').length > 2 ? "linenums" : "";
- var format = attributes.format || defaultFormat;
+ - if (attributes.format === '.') format = '';
- var avoid = !!attributes.avoid;
if (title)
@@ -21,10 +73,49 @@ mixin makeExample(_filePath, region, _title, stylePatterns)
code-example(language="#{language}" format="#{format}")
!= styleString(frag, stylePatterns)
+//- Like makeExample, but the first argument is a path that is
+//- relative to the project root. Unless title is defined,
+//- the project relative path will be used.
+mixin makeProjExample(projRootRelativePath, region, title, stylePatterns)
+ - var relPath = projRootRelativePath.trim();
+ - var filePath = getExampleName() + '/ts/' + relPath;
+ - if (!title) {
+ - // Is path like styles.1.css? Then drop the '.1' qualifier:
+ - var matches = relPath.match(/^(.*)\.\d(\.\w+)$/);
+ - title = matches ? matches[1] + matches[2] : relPath;
+ - }
+ +makeExample(filePath, region, title, stylePatterns)
+
+//- Like makeExample, but doesn't show line numbers, and the first
+//- argument is a path that is relative to the example project root.
+//- Unless title is defined, the project relative path will be used.
+//- Title will always end with a phrase in parentheses; if no such
+//- ending is given, then the title will be suffixed with
+//- either "(excerpt)", or "(#{region})" when region is defined.
+mixin makeExcerpt(projRootRelativePath, region, title, stylePatterns)
+ - var relPath = projRootRelativePath.trim();
+ - var filePath = getExampleName() + '/ts/' + relPath;
+ - if (!title) {
+ - // Is path like styles.1.css? Then drop the '.1' qualifier:
+ - var matches = relPath.match(/^(.*)\.\d(\.\w+)$/);
+ - title = matches ? matches[1] + matches[2] : relPath;
+ - }
+ - var excerpt = region || 'excerpt';
+ - if (title && !title.match(/\([\w ]+\)$/)) title = title + ' (' + excerpt + ')';
+ +makeExample(filePath, region, title, stylePatterns)(format='.')
+
+//- Extract the doc example name from `current`.
+- var getExampleName = function() {
+- var dir = current.path[current.path.length - 1];
+- return dir == 'latest' ? current.source : dir;
+- };
+
mixin makeTabs(filePaths, regions, tabNames, stylePatterns)
- filePaths = strSplit(filePaths);
+ - if (adjustExamplePath) filePaths = filePaths.map(adjustExamplePath);
- regions = strSplit(regions, filePaths.length);
- tabNames = strSplit(tabNames, filePaths.length);
+ - if (adjustExampleTitle) tabNames = tabNames.map(adjustExampleTitle);
code-tabs
each filePath,index in filePaths
@@ -77,7 +168,7 @@ script.
el.style.display = isVerbose ? 'block' : 'none';
var el = document.querySelector('button.verbose.on');
el.style.display = isVerbose ? 'none' : 'block';
-
+
CCSStylesheetRuleStyle('main','.l-verbose-section', 'display',
isVerbose ? 'block' : 'none');
}
diff --git a/public/all-resources.jade b/public/all-resources.jade
deleted file mode 100644
index 1d6dfa6d0c..0000000000
--- a/public/all-resources.jade
+++ /dev/null
@@ -1,200 +0,0 @@
-div
- p(class="text-body") Would you like to be listed in this page? Fill out this form.
- div(style="display: flex; justify-content: space-between; flex-wrap: wrap;")
- div
- h1 Books
- div(class="resources")
- h3 Packt Publishing
- ul(class="publisher")
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/switching-angular-2") Switching to Angular 2
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/mastering-angular-2-components") Mastering Angular 2 Components
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/angular-2-blueprints") Angular 2 Blueprints
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/angular-2-example") Angular 2 By Examples
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/mastering-angular-2-components") Angular 2 Components
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/learning-angular-2-net-developers") Learning Angular 2 for .NET Developers
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/angular-2-test-driven-development") Angular 2 Test-driven Development
-
- h3 Manning Publications
- ul(class="publisher")
- li(class="book")
- a(class="title text-body" href="https://www.manning.com/books/angular-2-in-action") Angular 2 In Action
- li(class="book")
- a(class="title text-body" href="https://www.manning.com/books/angular-2-development-with-typescript") Angular 2 Development with TypeScript
- li(class="book")
- a(class="title text-body" href="https://www.manning.com/books/testing-angular-2-applications") Testing Angular 2 Applications
-
- h3 O'Reilly Media
- ul(class="publisher")
- li(class="book")
- a(class="title text-body" href="http://www.oreilly.com/pub/e/3693") Angular 2 Web Development with TypeScript
- li(class="book")
- a(class="title text-body" href="http://shop.oreilly.com/product/0636920051824.do") Migrating to Angular 2
- li(class="book")
- a(class="title text-body" href="http://shop.oreilly.com/product/9781785886201.do") Switching to Angular 2
-
- h3 Self-published
- ul(class="publisher")
- li(class="book")
- a(class="title text-body" href="http://ngcourse.rangle.io/") Rangle.io: ngCourse 2
- li(class="book")
- a(class="title text-body" href="https://www.ng-book.com/2/") ng-book 2
- li(class="book")
- a(class="title text-body" href="https://leanpub.com/angular2-book") Angular 2 Book
- li(class="book")
- a(class="title text-body" href="https://books.ninja-squad.com/angular2") Become a ninja with Angular 2
- li(class="book")
- a(class="title text-body" href="https://leanpub.com/practical-angular-2") Practical Angular 2
-
- div
- h1 Training
- div(class="resources")
- h3 Rangle.io
- ul(class="publisher")
- li(class="course")
- a(class="title text-body" href="http://rangle.io/services/javascript-training/training-angular1-angular2-with-ngupgrade/") Angular 2 Online Training
-
- h3 Pluralsight
- ul(class="publisher")
- li(class="course")
- a(class="title text-body" href="https://www.pluralsight.com/courses/angular-2-first-look") Angular 2: First Look
- li(class="course")
- a(class="title text-body" href="https://www.pluralsight.com/courses/angular-2-getting-started") Angular 2: Getting Started
-
- h3 Udemy
- ul(class="publisher")
- li
- a(class="title text-body" href="https://www.udemy.com/the-complete-guide-to-angular-2/?utm_content=_._ag_angular%202_._ad_47395956109_._de_c_._dm__._lo_9061189_._&matchtype=b&gclid=CjwKEAjww9O3BRDp1tq0jIP023YSJAB0-j1S4bFN4tudrjzZO_-ABNAfFQJrhrKo7KX1AnV-8yjV-hoCRrDw_wcB&utm_medium=udemyads&k_clickid=dce13cd7-9844-44dc-9967-020275b637c9_408_GOOGLE_NEW-AW-PROS-TECH-Dev-angular-2-EN-ENG_._ci_756150_._sl_ENG_._vi_TECH_._sd_All_._la_EN_.__angular%202_%2Bangular%20%2B2_b_47395956109_c&utm_campaign=NEW-AW-PROS-TECH-Dev-angular-2-EN-ENG_._ci_756150_._sl_ENG_._vi_TECH_._sd_All_._la_EN_._&utm_source=adwords&utm_term=_._pl__._pd__._ti_kwd-68757357257_._kw_%2Bangular%20%2B2_._&pmtag=72bf13dc-329c-411c-b381-a6143735b9dc") The Complete Guide to Angular 2
- li
- a(class="title text-body" href="https://www.udemy.com/angular-2-tutorial-for-beginners/") Angular 2 With TypeScript for Beginners
- li
- a(class="title text-body" href="https://www.udemy.com/angular-2-tutorial-for-beginners/") Angular 2 Jumpstart with Typescript
- li
- a(class="title text-body" href="https://www.udemy.com/angular-2-fundamentals/") Angular 2 Fundamentals
- li
- a(class="title text-body" href="https://www.udemy.com/angular-2-master-class-with-alejandro-rangel/") Angular 2 Master Class
- li
- a(class="title text-body" href="https://www.udemy.com/introduction-to-angular2/") Angular 2 Demystified
-
- h3 egghead.io
- ul(class="publisher")
- li
- a(class="title text-body" href="https://egghead.io/technologies/angular2") Angular 2 videos
-
- h3 Workshops & Onsite Training Vendors
- ul(class="publisher")
- li
- a(class="title text-body" href="http://rangle.io/services/javascript-training/angular2-training/") Rangle.io
- li
- a(class="title text-body" href="http://oasisdigital.com/training") Oasis Digital
- li
- a(class="title text-body" href="http://thoughtram.io/") Thoughtram
-
- div
- h1 Tooling and Libraries
- div(class="resources")
- h3 Tooling
- ul
- li
- a(class="text-body" href="https://augury.rangle.io/") Augury
- li
- a(class="text-body" href="https://github.com/angular/universal") Angular Universal
- li
- a(class="text-body" href="https://github.com/johnpapa/lite-server") Lite-server
- li
- a(class="text-body" href="https://github.com/mgechev/codelyzer") Codelyzer
-
- h3 IDEs
- ul
- li
- a(class="text-body" href="http://code.visualstudio.com/") Visual Studio Code
- li
- a(class="text-body" href="https://www.jetbrains.com/webstorm/") WebStorm
- li
- a(class="text-body" href="https://www.jetbrains.com/idea/") IntelliJ IDEA
-
- h3 Data Libraries
- ul
- li
- a(class="text-body" href="https://www.firebase.com/") Firebase
- li
- a(class="text-body" href="https://www.meteor.com/") Meteor
- li
- a(class="text-body" href="http://mean.io/") MEAN
-
- h3 UI Components
- ul
- li
- a(class="text-body" href="https://github.com/angular/material2") Angular Material 2
- li
- a(class="text-body" href="http://www.primefaces.org/primeng/") Prime Faces
- li
- a(class="text-body" href="http://www.telerik.com/blogs/what-to-expect-in-2016-for-kendo-ui-with-angular-2-and-more") Kendo UI
- li
- a(class="text-body" href="http://ng-lightning.github.io/ng-lightning/") ng-lightening
- li
- a(class="text-body" href="http://wijmo.com/products/wijmo-5/") Wijmo
- li
- a(class="text-body" href="https://angular-ui.github.io/bootstrap/") Bootstrap UI
- li
- a(class="text-body" href="https://vaadin.com/home") Vaadin
-
- h3 Cross-Platform Development
- ul
- li
- a(class="text-body" href="https://github.com/NativeScript/nativescript-angular") NativeScript
- li
- a(class="text-body" href="http://angular.github.io/react-native-renderer/") React Native
- li
- a(class="text-body" href="http://ionicframework.com/docs/v2/") Ionic
- li
- a(class="text-body" href="http://github.com/angular/angular-electron") Electron
- li
- a(class="text-body" href="http://github.com/preboot/angular2-universal-windows-app") Windows (UWP)
-
- div
- h1 Communities
- div(class="resources")
- p(class="text-body") Would you like to be listed in this page? Fill out this form.
-
- h3 Podcasts
- ul(class="podcasts")
- li(class="podcast")
- a(class="text-body" href="https://angularair.com/") AngularAir
- li(class="podcast")
- a(class="text-body" href="https://javascriptair.com/") JavaScript Air
- li(class="podcast")
- a(class="text-body" href="https://devchat.tv/adventures-in-angular") Adventures in Angular
-
-
- h3 Communities
- ul(class="communities")
- li(class="community")
- a(class="text-body" href="http://angularbeers.org/") Angular Beers
- li(class="community")
- a(class="text-body" href="http://angularcamp.org/") Angular Camp
- li(class="community")
- a(class="text-body" href="http://www.meetup.com/find/?allMeetups=false&keywords=angularjs&radius=Infinity&userFreeform=94043&gcResults=Mountain+View%2C+CA+94043%2C+USA%3AUS%3ACalifornia%3ASanta+Clara+County%3AMountain+View%3Anull%3A94043%3A37.428434%3A-122.07238159999997&change=yes&sort=default") Angular Meetups
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/books.jade b/public/books.jade
deleted file mode 100644
index b9a60d089a..0000000000
--- a/public/books.jade
+++ /dev/null
@@ -1,54 +0,0 @@
-div(class="resources")
- p(class="text-body") Would you like to be listed in this page? Fill out this form.
-
- h3 Packt Publishing
- ul(class="publisher")
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/switching-angular-2") Switching to Angular 2
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/mastering-angular-2-components") Mastering Angular 2 Components
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/angular-2-blueprints") Angular 2 Blueprints
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/angular-2-example") Angular 2 By Examples
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/mastering-angular-2-components") Angular 2 Components
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/learning-angular-2-net-developers") Learning Angular 2 for .NET Developers
- li(class="book")
- a(class="title text-body" href="https://www.packtpub.com/web-development/angular-2-test-driven-development") Angular 2 Test-driven Development
-
- h3 Manning Publications
- ul(class="publisher")
- li(class="book")
- a(class="title text-body" href="https://www.manning.com/books/angular-2-in-action") Angular 2 In Action
- li(class="book")
- a(class="title text-body" href="https://www.manning.com/books/angular-2-development-with-typescript") Angular 2 Development with TypeScript
- li(class="book")
- a(class="title text-body" href="https://www.manning.com/books/testing-angular-2-applications") Testing Angular 2 Applications
-
- h3 O'Reilly Media
- ul(class="publisher")
- li(class="book")
- a(class="title text-body" href="http://www.oreilly.com/pub/e/3693") Angular 2 Web Development with TypeScript
- li(class="book")
- a(class="title text-body" href="http://shop.oreilly.com/product/0636920051824.do") Migrating to Angular 2
- li(class="book")
- a(class="title text-body" href="http://shop.oreilly.com/product/9781785886201.do") Switching to Angular 2
-
- h3 Self-published
- ul(class="publisher")
- li(class="book")
- a(class="title text-body" href="http://ngcourse.rangle.io/") Rangle.io: ngCourse 2
- li(class="book")
- a(class="title text-body" href="https://www.ng-book.com/2/") ng-book 2
- li(class="book")
- a(class="title text-body" href="https://leanpub.com/angular2-book") Angular 2 Book
- li(class="book")
- a(class="title text-body" href="https://books.ninja-squad.com/angular2") Become a ninja with Angular 2
- li(class="book")
- a(class="title text-body" href="https://leanpub.com/practical-angular-2") Practical Angular 2
-
-
-
-
diff --git a/public/communities.jade b/public/communities.jade
deleted file mode 100644
index a6b5c0dcf4..0000000000
--- a/public/communities.jade
+++ /dev/null
@@ -1,26 +0,0 @@
-div(class="resources")
- p(class="text-body") Would you like to be listed in this page? Fill out this form.
-
- h3 Podcasts
- ul(class="podcasts")
- li(class="podcast")
- a(class="text-body" href="https://angularair.com/") AngularAir
- li(class="podcast")
- a(class="text-body" href="https://javascriptair.com/") JavaScript Air
- li(class="podcast")
- a(class="text-body" href="https://devchat.tv/adventures-in-angular") Adventures in Angular
-
-
- h3 Communities
- ul(class="communities")
- li(class="community")
- a(class="text-body" href="http://angularbeers.org/") Angular Beers
- li(class="community")
- a(class="text-body" href="http://angularcamp.org/") Angular Camp
- li(class="community")
- a(class="text-body" href="http://www.meetup.com/find/?allMeetups=false&keywords=angularjs&radius=Infinity&userFreeform=94043&gcResults=Mountain+View%2C+CA+94043%2C+USA%3AUS%3ACalifornia%3ASanta+Clara+County%3AMountain+View%3Anull%3A94043%3A37.428434%3A-122.07238159999997&change=yes&sort=default") Angular Meetups
-
-
-
-
-
diff --git a/public/docs/_examples/.gitignore b/public/docs/_examples/.gitignore
index a7b60352e4..449fd35581 100644
--- a/public/docs/_examples/.gitignore
+++ b/public/docs/_examples/.gitignore
@@ -20,7 +20,7 @@ _test-output
_temp
**/ts/**/*.js
**/ts-snippets/**/*.js
-**/ts/**/*.d.ts
+*.d.ts
!**/*e2e-spec.js
!systemjs.config.1.js
diff --git a/public/docs/_examples/architecture/ts/app/app.component.ts b/public/docs/_examples/architecture/ts/app/app.component.ts
index 409fde3aa3..930cf5f045 100644
--- a/public/docs/_examples/architecture/ts/app/app.component.ts
+++ b/public/docs/_examples/architecture/ts/app/app.component.ts
@@ -1,8 +1,8 @@
// #docregion import
-import {Component} from '@angular/core';
+import { Component } from '@angular/core';
// #enddocregion import
-import {HeroListComponent} from './hero-list.component';
-import {SalesTaxComponent} from './sales-tax.component';
+import { HeroListComponent } from './hero-list.component';
+import { SalesTaxComponent } from './sales-tax.component';
@Component({
selector: 'my-app',
diff --git a/public/docs/_examples/architecture/ts/app/backend.service.ts b/public/docs/_examples/architecture/ts/app/backend.service.ts
index 2170c88758..907a40696e 100644
--- a/public/docs/_examples/architecture/ts/app/backend.service.ts
+++ b/public/docs/_examples/architecture/ts/app/backend.service.ts
@@ -1,6 +1,7 @@
-import {Injectable, Type} from '@angular/core';
-import {Logger} from './logger.service';
-import {Hero} from './hero';
+import { Injectable, Type } from '@angular/core';
+
+import { Logger } from './logger.service';
+import { Hero } from './hero';
const HEROES = [
new Hero('Windstorm', 'Weather mastery'),
@@ -10,7 +11,7 @@ const HEROES = [
@Injectable()
export class BackendService {
- constructor(private _logger: Logger) {}
+ constructor(private logger: Logger) {}
getAll(type:Type) : PromiseLike Highlight me! Highlight me!
+
Highlight me too!
-Sales Tax Calculator
Amount:
-
+
Highlight me!
+ + +I am green with envy!
+ diff --git a/public/docs/_examples/attribute-directives/dart/lib/highlight_directive.dart b/public/docs/_examples/attribute-directives/dart/lib/highlight_directive.dart index a6c0856cc4..e6190a443c 100644 --- a/public/docs/_examples/attribute-directives/dart/lib/highlight_directive.dart +++ b/public/docs/_examples/attribute-directives/dart/lib/highlight_directive.dart @@ -2,51 +2,42 @@ // #docregion full import 'package:angular2/core.dart'; -@Directive(selector: '[my-highlight]', host: const { +@Directive(selector: '[myHighlight]', host: const { '(mouseenter)': 'onMouseEnter()', '(mouseleave)': 'onMouseLeave()' }) // #docregion class-1 -class Highlight { - // #enddocregion class-1 -// #enddocregion full - /* -// #docregion highlight - @Input() myHighlight: string; -// #enddocregion highlight - */ -// #docregion full -// #docregion class-1 -// #docregion color - @Input('my-highlight') String highlightColor; -// #enddocregion color - +class HighlightDirective { String _defaultColor = 'red'; + final dynamic _el; + + HighlightDirective(ElementRef elRef) : _el = elRef.nativeElement; // #enddocregion class-1 + // #docregion defaultColor @Input() set defaultColor(String colorName) { _defaultColor = (colorName ?? _defaultColor); } // #enddocregion defaultColor -// #docregion class-1 + // #docregion class-1 - final ElementRef _element; + // #docregion color + @Input('myHighlight') String highlightColor; + // #enddocregion color + + // #docregion mouse-enter + void onMouseEnter() { _highlight(highlightColor ?? _defaultColor); } + // #enddocregion mouse-enter + void onMouseLeave() { _highlight(); } -// #docregion mouse-enter - onMouseEnter() { - _highlight(highlightColor ?? _defaultColor); + void _highlight([String color]) { + if(_el != null) _el.style.backgroundColor = color; } - -// #enddocregion mouse-enter - onMouseLeave() { - _highlight(null); - } - - void _highlight(String color) { - _element.nativeElement.style.backgroundColor = color; - } - - Highlight(this._element); } // #enddocregion class-1 // #enddocregion full +/* +// #docregion highlight +@Input() String myHighlight; +// #enddocregion highlight +*/ diff --git a/public/docs/_examples/attribute-directives/dart/lib/highlight_directive_1.dart b/public/docs/_examples/attribute-directives/dart/lib/highlight_directive_1.dart index 3b79e66a3b..2ce0e35919 100644 --- a/public/docs/_examples/attribute-directives/dart/lib/highlight_directive_1.dart +++ b/public/docs/_examples/attribute-directives/dart/lib/highlight_directive_1.dart @@ -3,9 +3,9 @@ library attribute_directives.highlight_directive; import 'package:angular2/core.dart'; -@Directive(selector: '[my-highlight]') -class Highlight { - Highlight(ElementRef element) { +@Directive(selector: '[myHighlight]') +class HighlightDirective { + HighlightDirective(ElementRef element) { element.nativeElement.style.backgroundColor = 'yellow'; } } diff --git a/public/docs/_examples/attribute-directives/dart/lib/highlight_directive_2.dart b/public/docs/_examples/attribute-directives/dart/lib/highlight_directive_2.dart index 8c540b3a6a..8546f36279 100644 --- a/public/docs/_examples/attribute-directives/dart/lib/highlight_directive_2.dart +++ b/public/docs/_examples/attribute-directives/dart/lib/highlight_directive_2.dart @@ -1,32 +1,28 @@ // #docregion import 'package:angular2/core.dart'; -@Directive(selector: '[my-highlight]', -// #docregion host +@Directive(selector: '[myHighlight]', + // #docregion host host: const { '(mouseenter)': 'onMouseEnter()', '(mouseleave)': 'onMouseLeave()' } -// #enddocregion host - ) -class Highlight { - final ElementRef _element; -// #docregion mouse-methods - onMouseEnter() { - _highlight("yellow"); - } + // #enddocregion host +) +class HighlightDirective { + // #docregion ctor + final dynamic _el; - onMouseLeave() { - _highlight(null); + HighlightDirective(ElementRef elRef) : _el = elRef.nativeElement; + // #enddocregion ctor + + // #docregion mouse-methods + void onMouseEnter() { _highlight("yellow"); } + void onMouseLeave() { _highlight(); } + + void _highlight([String color]) { + if (_el != null) _el.style.backgroundColor = color; } // #enddocregion mouse-methods - - void _highlight(String color) { - _element.nativeElement.style.backgroundColor = color; - } - -// #docregion ctor - Highlight(this._element); -// #enddocregion ctor } // #enddocregion diff --git a/public/docs/_examples/attribute-directives/ts/app/app.component.1.html b/public/docs/_examples/attribute-directives/ts/app/app.component.1.html index 177c90f5da..e5ee1c6463 100644 --- a/public/docs/_examples/attribute-directives/ts/app/app.component.1.html +++ b/public/docs/_examples/attribute-directives/ts/app/app.component.1.html @@ -1,4 +1,7 @@Highlight me!
+ + +I am green with envy!
+ diff --git a/public/docs/_examples/attribute-directives/ts/app/app.component.html b/public/docs/_examples/attribute-directives/ts/app/app.component.html index 35b5d43aae..e4e445b1a8 100644 --- a/public/docs/_examples/attribute-directives/ts/app/app.component.html +++ b/public/docs/_examples/attribute-directives/ts/app/app.component.html @@ -7,10 +7,9 @@ Yellow Cyan - - +Highlight me!
- + @@ -18,5 +17,4 @@ Highlight me too! - - \ No newline at end of file + diff --git a/public/docs/_examples/attribute-directives/ts/app/app.component.ts b/public/docs/_examples/attribute-directives/ts/app/app.component.ts index 458e02e08e..15167310c6 100644 --- a/public/docs/_examples/attribute-directives/ts/app/app.component.ts +++ b/public/docs/_examples/attribute-directives/ts/app/app.component.ts @@ -1,6 +1,7 @@ // #docregion -import {Component} from '@angular/core'; -import {HighlightDirective} from './highlight.directive'; +import { Component } from '@angular/core'; + +import { HighlightDirective } from './highlight.directive'; @Component({ selector: 'my-app', diff --git a/public/docs/_examples/attribute-directives/ts/app/highlight.directive.1.ts b/public/docs/_examples/attribute-directives/ts/app/highlight.directive.1.ts index 3d3632272a..f8c1a95ea1 100644 --- a/public/docs/_examples/attribute-directives/ts/app/highlight.directive.1.ts +++ b/public/docs/_examples/attribute-directives/ts/app/highlight.directive.1.ts @@ -1,13 +1,9 @@ // #docregion -import {Directive, ElementRef, Input} from '@angular/core'; - -@Directive({ - selector: '[myHighlight]' -}) +import { Directive, ElementRef, Input } from '@angular/core'; +@Directive({ selector: '[myHighlight]' }) export class HighlightDirective { constructor(el: ElementRef) { el.nativeElement.style.backgroundColor = 'yellow'; } } -// #enddocregion \ No newline at end of file diff --git a/public/docs/_examples/attribute-directives/ts/app/highlight.directive.2.ts b/public/docs/_examples/attribute-directives/ts/app/highlight.directive.2.ts index 9e7abaab88..8e64391f05 100644 --- a/public/docs/_examples/attribute-directives/ts/app/highlight.directive.2.ts +++ b/public/docs/_examples/attribute-directives/ts/app/highlight.directive.2.ts @@ -1,5 +1,5 @@ // #docregion -import {Directive, ElementRef, Input} from '@angular/core'; +import { Directive, ElementRef, Input } from '@angular/core'; @Directive({ selector: '[myHighlight]', @@ -12,20 +12,20 @@ import {Directive, ElementRef, Input} from '@angular/core'; }) export class HighlightDirective { - + // #docregion ctor - private _el:HTMLElement; - constructor(el: ElementRef) { this._el = el.nativeElement; } + private el:HTMLElement; + constructor(el: ElementRef) { this.el = el.nativeElement; } // #enddocregion ctor // #docregion mouse-methods - onMouseEnter() { this._highlight("yellow"); } - onMouseLeave() { this._highlight(null); } + onMouseEnter() { this.highlight("yellow"); } + onMouseLeave() { this.highlight(null); } - private _highlight(color: string) { - this._el.style.backgroundColor = color; + private highlight(color: string) { + this.el.style.backgroundColor = color; } // #enddocregion mouse-methods } -// #enddocregion \ No newline at end of file +// #enddocregion diff --git a/public/docs/_examples/attribute-directives/ts/app/highlight.directive.ts b/public/docs/_examples/attribute-directives/ts/app/highlight.directive.ts index 2e9d68e9e1..6ec9842602 100644 --- a/public/docs/_examples/attribute-directives/ts/app/highlight.directive.ts +++ b/public/docs/_examples/attribute-directives/ts/app/highlight.directive.ts @@ -1,6 +1,6 @@ // #docplaster // #docregion full -import {Directive, ElementRef, Input} from '@angular/core'; +import { Directive, ElementRef, Input } from '@angular/core'; @Directive({ selector: '[myHighlight]', @@ -9,44 +9,38 @@ import {Directive, ElementRef, Input} from '@angular/core'; '(mouseleave)': 'onMouseLeave()' } }) - // #docregion class-1 export class HighlightDirective { - private _defaultColor = 'red'; - private _el:HTMLElement; -// #enddocregion class-1 -// #enddocregion full - /* -// #docregion highlight - @Input() myHighlight: string; -// #enddocregion highlight - */ -// #docregion full + private el: HTMLElement; + + constructor(el: ElementRef) { this.el = el.nativeElement; } + // #enddocregion class-1 -// #docregion defaultColor + // #docregion defaultColor @Input() set defaultColor(colorName:string){ this._defaultColor = colorName || this._defaultColor; } -// #enddocregion defaultColor -// #docregion class-1 + // #enddocregion defaultColor + // #docregion class-1 -// #docregion color + // #docregion color @Input('myHighlight') highlightColor: string; -// #enddocregion color + // #enddocregion color -// #enddocregion class-1 -// #docregion class-1 - constructor(el: ElementRef) { this._el = el.nativeElement; } + // #docregion mouse-enter + onMouseEnter() { this.highlight(this.highlightColor || this._defaultColor); } + // #enddocregion mouse-enter + onMouseLeave() { this.highlight(null); } -// #docregion mouse-enter - onMouseEnter() { this._highlight(this.highlightColor || this._defaultColor); } -// #enddocregion mouse-enter - onMouseLeave() { this._highlight(null); } - - private _highlight(color:string) { - this._el.style.backgroundColor = color; + private highlight(color:string) { + this.el.style.backgroundColor = color; } } // #enddocregion class-1 -// #enddocregion full \ No newline at end of file +// #enddocregion full +/* +// #docregion highlight +@Input() myHighlight: string; +// #enddocregion highlight +*/ diff --git a/public/docs/_examples/attribute-directives/ts/app/main.ts b/public/docs/_examples/attribute-directives/ts/app/main.ts index 1bb870eea0..4fc79adda1 100644 --- a/public/docs/_examples/attribute-directives/ts/app/main.ts +++ b/public/docs/_examples/attribute-directives/ts/app/main.ts @@ -1,5 +1,7 @@ // #docregion -import {bootstrap} from '@angular/platform-browser-dynamic'; -import {AppComponent} from './app.component'; +import { bootstrap } from '@angular/platform-browser-dynamic'; + +import { AppComponent } from './app.component'; bootstrap(AppComponent); + diff --git a/public/docs/_examples/attribute-directives/ts/index.html b/public/docs/_examples/attribute-directives/ts/index.html index 6bfef2480d..6988ae496a 100644 --- a/public/docs/_examples/attribute-directives/ts/index.html +++ b/public/docs/_examples/attribute-directives/ts/index.html @@ -16,13 +16,10 @@ - -