├── .editorconfig
├── .gitignore
├── .jshintrc
├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── appveyor.yml
├── firebase.json
├── gulpfile.ts
├── karma.conf.js
├── package.json
├── protractor.conf.js
├── src
├── about
│ └── components
│ │ ├── about.html
│ │ └── about.ts
├── app
│ └── components
│ │ ├── app.css
│ │ ├── app.e2e.ts
│ │ ├── app.html
│ │ ├── app.spec.ts
│ │ └── app.ts
├── assets
│ ├── img
│ │ └── smile.png
│ └── main.css
├── home
│ └── components
│ │ ├── home.css
│ │ ├── home.e2e.ts
│ │ ├── home.html
│ │ ├── home.spec.ts
│ │ └── home.ts
├── hot_loader_main.ts
├── index.html
├── main.ts
└── sw.js
├── test-main.js
├── tools
├── config.ts
├── manual_typings
│ ├── angular2-hot-loader.d.ts
│ ├── connect-livereload.d.ts
│ ├── karma.d.ts
│ ├── merge-stream.d.ts
│ ├── open.d.ts
│ ├── slash.d.ts
│ ├── systemjs-builder.d.ts
│ └── tiny-lr.d.ts
├── tasks
│ ├── build.assets.dev.ts
│ ├── build.assets.prod.ts
│ ├── build.bundles.app.ts
│ ├── build.bundles.ts
│ ├── build.docs.ts
│ ├── build.e2e_test.ts
│ ├── build.html_css.prod.ts
│ ├── build.index.dev.ts
│ ├── build.index.prod.ts
│ ├── build.js.dev.ts
│ ├── build.js.prod.ts
│ ├── build.test.ts
│ ├── check.versions.ts
│ ├── clean.ts
│ ├── karma.start.ts
│ ├── serve.docs.ts
│ ├── server.start.ts
│ ├── tslint.ts
│ ├── watch.dev.ts
│ ├── watch.serve.ts
│ └── watch.test.ts
├── utils.ts
└── utils
│ ├── code_change_tools.ts
│ ├── server.ts
│ ├── tasks_tools.ts
│ ├── template_injectables.ts
│ └── template_locals.ts
├── tsconfig.json
├── tslint.json
└── typings.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | charset = utf-8
7 | indent_style = space
8 | indent_size = 2
9 | end_of_line = lf
10 | insert_final_newline = true
11 | trim_trailing_whitespace = true
12 |
13 | [*.md]
14 | insert_final_newline = false
15 | trim_trailing_whitespace = false
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 |
5 | # Runtime data
6 | pids
7 | *.pid
8 | *.seed
9 |
10 | # Directory for instrumented libs generated by jscoverage/JSCover
11 | lib-cov
12 |
13 | # Coverage directory used by tools like istanbul
14 | coverage
15 |
16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17 | .grunt
18 |
19 | # Compiled binary addons (http://nodejs.org/api/addons.html)
20 | build/Release
21 |
22 | # Dependency directory
23 | # Commenting this out is preferred by some people, see
24 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
25 | /node_modules/
26 | /typings/
27 |
28 | # Users Environment Variables
29 | .lock-wscript
30 | .tsdrc
31 | .typingsrc
32 |
33 | #IDE configuration files
34 | .idea
35 | .vscode
36 | *.iml
37 |
38 | dist
39 | dev
40 | docs
41 | lib
42 | test
43 | tmp
44 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "bitwise": true,
3 | "camelcase": true,
4 | "curly": true,
5 | "eqeqeq": true,
6 | "es3": false,
7 | "forin": true,
8 | "freeze": true,
9 | "immed": true,
10 | "indent": 2,
11 | "latedef": "nofunc",
12 | "newcap": true,
13 | "noarg": true,
14 | "noempty": true,
15 | "nonbsp": true,
16 | "nonew": true,
17 | "plusplus": false,
18 | "quotmark": "single",
19 | "undef": true,
20 | "unused": false,
21 | "strict": false,
22 | "maxparams": 10,
23 | "maxdepth": 5,
24 | "maxstatements": 40,
25 | "maxcomplexity": 8,
26 | "maxlen": 140,
27 |
28 | "asi": false,
29 | "boss": false,
30 | "debug": false,
31 | "eqnull": true,
32 | "esnext": false,
33 | "evil": false,
34 | "expr": false,
35 | "funcscope": false,
36 | "globalstrict": false,
37 | "iterator": false,
38 | "lastsemic": false,
39 | "laxbreak": false,
40 | "laxcomma": false,
41 | "loopfunc": true,
42 | "maxerr": false,
43 | "moz": false,
44 | "multistr": false,
45 | "notypeof": false,
46 | "proto": false,
47 | "scripturl": false,
48 | "shadow": false,
49 | "sub": true,
50 | "supernew": false,
51 | "validthis": false,
52 | "noyield": false,
53 |
54 | "browser": true,
55 | "node": true,
56 |
57 | "globals": {
58 | "angular": false,
59 | "ng": false
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - '4.0'
4 | - '4.1'
5 | - '5.1'
6 | sudo: false
7 | services:
8 | before_install:
9 | - npm --version
10 | - export CHROME_BIN=chromium-browser
11 | - export DISPLAY=:99.0
12 | - sh -e /etc/init.d/xvfb start
13 | before_script:
14 | notifications:
15 | email: true
16 | after_failure: cat /home/travis/build/mgechev/angular2-seed/npm-debug.log
17 | branches:
18 | only:
19 | - master
20 | notifications:
21 | webhooks:
22 | urls:
23 | - https://webhooks.gitter.im/e/565e4b2fed3b96c1b964
24 | on_success: change # options: [always|never|change] default: always
25 | on_failure: always # options: [always|never|change] default: always
26 | on_start: never # options: [always|never|change] default: always
27 | env:
28 | global:
29 | # https://github.com/DefinitelyTyped/tsd#tsdrc
30 | # Token has no scope (read-only access to public information)
31 | - TSD_GITHUB_TOKEN=9b18c72997769f3867ef2ec470e626d39661795d
32 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Submitting Pull Requests
2 |
3 | **Please follow these basic steps to simplify pull request reviews - if you don't you'll probably just be asked to anyway.**
4 |
5 | * Please rebase your branch against the current master
6 | * Run ```npm install``` to make sure your development dependencies are up-to-date
7 | * Please ensure that the test suite passes **and** that code is lint free before submitting a PR by running:
8 | * ```npm test```
9 | * If you've added new functionality, **please** include tests which validate its behaviour
10 | * Make reference to possible [issues](https://github.com/mgechev/angular2-seed/issues) on PR comment
11 |
12 | ## Submitting bug reports
13 |
14 | * Please detail the affected browser(s) and operating system(s)
15 | * Please be sure to state which version of node **and** npm you're using
16 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Minko Gechev
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AngularFire 2 Seed for Static Showdown
2 |
3 | This project has everything needed to get started building an Angular 2 app with Firebase.
4 |
5 | This is a fork of the popular [angular2-seed](https://github.com/mgechev/angular2-seed) by @mgechev and other contributors.
6 | Refer to that repository for more advanced topics.
7 |
8 | * Refer to http://angular.io for guides and API reference for Angular 2
9 | * Refer to https://github.com/angular/angularfire2 for reference for AngularFire2
10 | * Refer to https://www.firebase.com/docs/web/ for docs on using Firebase for Web apps
11 | * Refer to http://www.typescriptlang.org/Tutorial to learn how to use TypeScript
12 |
13 | ## Caution!
14 |
15 | This project uses several projects that are in beta or alpha (Angular 2 beta, AngularFire2 Alpha, RxJS 5 beta).
16 | Only those with a taste for adventure and maybe a few bugs should proceed.
17 |
18 | If you run into issues, feel free to tweet at [@jeffbcross](https://twitter.com/jeffbcross) for help,
19 | or look for Jeff Cross on the [Static Showdown Slack](https://static-showdown.slack.com/).
20 |
21 | # How to start
22 |
23 | **Note** that this seed project requires node v4.x.x or higher and npm 2.14.7.
24 |
25 | In order to start the seed app use:
26 |
27 | ```bash
28 | git clone --depth 1 https://github.com/jeffbcross/angularfire2-seed.git
29 | cd angularfire2-seed
30 | # install the project's dependencies
31 | npm install
32 | # watches your files and uses livereload by default
33 | npm start
34 | ```
35 |
36 | # Create a Component
37 |
38 | To create a new Angular Route and Component:
39 |
40 | * copy the `src/about` directory to something like: `src/my-friends`.
41 | * Rename the html and TypeScript files inside `src/my-friends/components`:
42 | * Rename `src/my-friends/components/about.ts` to `src/my-friends/components/my-friends.ts`
43 | * Rename `src/my-friends/components/about.html` to `src/my-friends/components/my-friends.html`.
44 | * Replace the contents of `my-friends.html` with: `
Best Friend: {{bestFriend}}
`
45 | * Replace the contents of `my-friends.ts` with:
46 |
47 | ```typescript
48 | import {Component} from 'angular2/core';
49 |
50 | @Component({
51 | selector: 'my-friends',
52 | moduleId: module.id,
53 | templateUrl: './my-friends.html'
54 | })
55 | export class MyFriends {
56 | bestFriend: string = 'Jeff Cross';
57 | }
58 | ```
59 |
60 | * Then to make the component routable from the root of the application, edit `src/app/components/app.ts` as follows:
61 | * Import MyFriends component:
62 | ```typescript
63 | import {HomeCmp} from '../../home/components/home';
64 | import {AboutCmp} from '../../about/components/about';
65 | import {MyFriends} from '../../my-friends/components/my-friends';
66 | ```
67 | * Add a `RouteConfig` entry for my-friends:
68 | ```typescript
69 | { path: '/', component: HomeCmp, name: 'Home' },
70 | { path: '/about', component: AboutCmp, name: 'About' },
71 | { path: '/my-friends', component: MyFriends, name: 'MyFriends'}
72 | ```
73 |
74 | * Add a link to the route in the app template in `src/app/components/app.html`:
75 | ```html
76 | Home
77 | About
78 | My Friends
79 | ```
80 | * Open the app and click "My Friends"!
81 |
82 | # Deploy to Firebase Hosting
83 |
84 | ## Setup Firebase (if a Firebase does not yet already exist for this app)
85 |
86 | 1. Set up a Firebase at firebase.com
87 | 1. From https://www.firebase.com/account/#/ click "Set up hosting" for the Firebase and follow the steps.
88 | 1. Edit firebase.json in this project, set the `firebase` field to your subdomain.
89 |
90 | ```bash
91 | npm install -g firebase-tools
92 | npm run build.prod
93 | firebase deploy
94 | ```
95 |
96 | Then visit http://yourfirebase.firebaseapp.com
97 |
98 | # License
99 |
100 | MIT
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | # AppVeyor file
2 | # http://www.appveyor.com/docs/appveyor-yml
3 | # This file: cloned from https://github.com/gruntjs/grunt/blob/master/appveyor.yml
4 |
5 | # Build version format
6 | version: "{build}"
7 |
8 | # Test against this version of Node.js
9 | environment:
10 | nodejs_version: "4.1.0"
11 | # https://github.com/DefinitelyTyped/tsd#tsdrc
12 | # Token has no scope (read-only access to public information)
13 | TSD_GITHUB_TOKEN: "9b18c72997769f3867ef2ec470e626d39661795d"
14 |
15 | build: off
16 |
17 | clone_depth: 10
18 |
19 | # Fix line endings on Windows
20 | init:
21 | - git config --global core.autocrlf true
22 |
23 | install:
24 | - ps: Install-Product node $env:nodejs_version
25 | - npm install -g npm
26 | - ps: $env:path = $env:appdata + "\npm;" + $env:path
27 | - npm install
28 |
29 | test_script:
30 | # Output useful info for debugging.
31 | - node --version && npm --version
32 | # We test multiple Windows shells because of prior stdout buffering issues
33 | # filed against Grunt. https://github.com/joyent/node/issues/3584
34 | - ps: "npm --version # PowerShell" # Pass comment to PS for easier debugging
35 | - npm test
36 |
37 |
38 | notifications:
39 | - provider: Webhook
40 | url: https://webhooks.gitter.im/e/cfd8ce5ddee6f3a0b0c9
41 | on_build_success: false
42 | on_build_failure: true
43 | on_build_status_changed: true
44 |
45 |
--------------------------------------------------------------------------------
/firebase.json:
--------------------------------------------------------------------------------
1 | {
2 | "firebase": "static-showdown-seed",
3 | "public": "dist/prod",
4 | "ignore": [
5 | "firebase.json",
6 | "**/.*",
7 | "**/node_modules/**"
8 | ]
9 | }
--------------------------------------------------------------------------------
/gulpfile.ts:
--------------------------------------------------------------------------------
1 | import * as gulp from 'gulp';
2 | import {runSequence, task} from './tools/utils';
3 |
4 | // --------------
5 | // Clean (override).
6 | gulp.task('clean', task('clean', 'all'));
7 | gulp.task('clean.dist', task('clean', 'dist'));
8 | gulp.task('clean.test', task('clean', 'test'));
9 | gulp.task('clean.tmp', task('clean', 'tmp'));
10 |
11 | gulp.task('check.versions', task('check.versions'));
12 | gulp.task('build.docs', task('build.docs'));
13 | gulp.task('serve.docs', task('serve.docs'));
14 |
15 | // --------------
16 | // Build dev.
17 | gulp.task('build.dev', done =>
18 | runSequence('clean.dist',
19 | 'tslint',
20 | 'build.assets.dev',
21 | 'build.js.dev',
22 | 'build.e2e_test',
23 | 'build.index.dev',
24 | done));
25 |
26 | // --------------
27 | // Build prod.
28 | gulp.task('build.prod', done =>
29 | runSequence('clean.dist',
30 | 'clean.tmp',
31 | 'tslint',
32 | 'build.assets.prod',
33 | 'build.html_css.prod',
34 | 'build.js.prod',
35 | 'build.bundles',
36 | 'build.bundles.app',
37 | 'build.index.prod',
38 | done));
39 |
40 | // --------------
41 | // Watch.
42 | gulp.task('build.dev.watch', done =>
43 | runSequence('build.dev',
44 | 'watch.dev',
45 | done));
46 |
47 | gulp.task('build.test.watch', done =>
48 | runSequence('build.test',
49 | 'watch.test',
50 | done));
51 |
52 | // --------------
53 | // Test.
54 | gulp.task('test', done =>
55 | runSequence('clean.test',
56 | 'tslint',
57 | 'build.test',
58 | 'karma.start',
59 | done));
60 |
61 | // --------------
62 | // Serve.
63 | gulp.task('serve', done =>
64 | runSequence('build.dev',
65 | 'server.start',
66 | 'watch.serve',
67 | done));
68 |
69 | // --------------
70 | // Docs
71 | // Disabled until https://github.com/sebastian-lenz/typedoc/issues/162 gets resolved
72 | gulp.task('docs', done =>
73 | runSequence('build.docs',
74 | 'serve.docs',
75 | done));
76 |
--------------------------------------------------------------------------------
/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 | // Generated on Wed Jul 15 2015 09:44:02 GMT+0200 (Romance Daylight Time)
3 | 'use strict';
4 |
5 | module.exports = function(config) {
6 | config.set({
7 |
8 | // base path that will be used to resolve all patterns (eg. files, exclude)
9 | basePath: './',
10 |
11 |
12 | // frameworks to use
13 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
14 | frameworks: ['jasmine'],
15 |
16 |
17 | // list of files / patterns to load in the browser
18 | files: [
19 | 'node_modules/zone.js/dist/zone-microtask.js',
20 | 'node_modules/zone.js/dist/long-stack-trace-zone.js',
21 | 'node_modules/zone.js/dist/jasmine-patch.js',
22 | 'node_modules/es6-module-loader/dist/es6-module-loader.js',
23 | 'node_modules/traceur/bin/traceur-runtime.js', // Required by PhantomJS2, otherwise it shouts ReferenceError: Can't find variable: require
24 | 'node_modules/traceur/bin/traceur.js',
25 | 'node_modules/systemjs/dist/system.src.js',
26 | 'node_modules/reflect-metadata/Reflect.js',
27 |
28 | { pattern: 'node_modules/angular2/**/*.js', included: false, watched: false },
29 | { pattern: 'node_modules/angularfire2/**/*.js', included: false, watched: false },
30 | { pattern: 'node_modules/firebase/lib/firebase-web.js', included: false, watched: false },
31 | { pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
32 | { pattern: 'dist/test/spec/**/*.js', included: false, watched: true },
33 | { pattern: 'node_modules/systemjs/dist/system-polyfills.js', included: false, watched: false }, // PhantomJS2 (and possibly others) might require it
34 |
35 | 'test-main.js'
36 | ],
37 |
38 |
39 | // list of files to exclude
40 | exclude: [
41 | 'node_modules/angular2/**/*spec.js'
42 | ],
43 |
44 |
45 | // preprocess matching files before serving them to the browser
46 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
47 | preprocessors: {
48 | },
49 |
50 |
51 | // test results reporter to use
52 | // possible values: 'dots', 'progress'
53 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter
54 | reporters: ['mocha'],
55 |
56 |
57 | // web server port
58 | port: 9876,
59 |
60 |
61 | // enable / disable colors in the output (reporters and logs)
62 | colors: true,
63 |
64 |
65 | // level of logging
66 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
67 | logLevel: config.LOG_INFO,
68 |
69 |
70 | // enable / disable watching file and executing tests whenever any file changes
71 | autoWatch: true,
72 |
73 |
74 | // start these browsers
75 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
76 | browsers: [
77 | 'PhantomJS2',
78 | 'Chrome'
79 | ],
80 |
81 |
82 | customLaunchers: {
83 | Chrome_travis_ci: {
84 | base: 'Chrome',
85 | flags: ['--no-sandbox']
86 | }
87 | },
88 |
89 |
90 | // Continuous Integration mode
91 | // if true, Karma captures browsers, runs the tests and exits
92 | singleRun: false
93 | });
94 |
95 | if (process.env.APPVEYOR) {
96 | config.browsers = ['IE'];
97 | config.singleRun = true;
98 | config.browserNoActivityTimeout = 90000; // Note: default value (10000) is not enough
99 | }
100 |
101 | if (process.env.TRAVIS || process.env.CIRCLECI) {
102 | config.browsers = ['Chrome_travis_ci'];
103 | config.singleRun = true;
104 | }
105 | };
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular2-seed",
3 | "version": "0.0.0",
4 | "description": "Seed for Angular 2 apps",
5 | "repository": {
6 | "url": "https://github.com/mgechev/angular2-seed"
7 | },
8 | "scripts": {
9 | "build.dev": "gulp build.dev",
10 | "build.dev.watch": "gulp build.dev.watch",
11 | "build.prod": "gulp build.prod",
12 | "build.test": "gulp build.test",
13 | "build.test.watch": "gulp build.test.watch",
14 | "docs": "npm run gulp -- build.docs && npm run gulp -- serve.docs",
15 | "e2e": "protractor",
16 | "e2e-live": "protractor --elementExplorer",
17 | "gulp": "gulp",
18 | "karma": "karma",
19 | "karma.start": "karma start",
20 | "postinstall": "typings install && gulp check.versions && npm prune",
21 | "reinstall": "rimraf node_modules && npm cache clean && npm install",
22 | "start": "gulp serve --env dev",
23 | "serve.dev": "gulp serve --env dev",
24 | "tasks.list": "gulp --tasks-simple",
25 | "test": "gulp test",
26 | "webdriver-update": "webdriver-manager update",
27 | "webdriver-start": "webdriver-manager start"
28 | },
29 | "author": "Minko Gechev ",
30 | "license": "MIT",
31 | "devDependencies": {
32 | "async": "^1.4.2",
33 | "browser-sync": "^2.11.1",
34 | "chalk": "^1.1.1",
35 | "connect": "^3.4.1",
36 | "connect-history-api-fallback": "^1.1.0",
37 | "connect-livereload": "^0.5.3",
38 | "del": "^2.2.0",
39 | "event-stream": "^3.3.2",
40 | "express": "~4.13.1",
41 | "extend": "^3.0.0",
42 | "gulp": "^3.9.0",
43 | "gulp-concat": "^2.5.2",
44 | "gulp-cssnano": "^2.0.0",
45 | "gulp-filter": "^2.0.2",
46 | "gulp-inject": "^1.3.1",
47 | "gulp-inline-ng2-template": "^0.0.11",
48 | "gulp-load-plugins": "^0.10.0",
49 | "gulp-plumber": "~1.0.1",
50 | "gulp-shell": "~0.4.3",
51 | "gulp-sourcemaps": "~1.5.2",
52 | "gulp-template": "^3.0.0",
53 | "gulp-tslint": "^3.3.0",
54 | "gulp-tslint-stylish": "^1.0.4",
55 | "gulp-typedoc": "^1.2.1",
56 | "gulp-typescript": "~2.8.2",
57 | "gulp-uglify": "^1.2.0",
58 | "gulp-util": "^3.0.7",
59 | "gulp-watch": "^4.2.4",
60 | "jasmine-core": "~2.3.4",
61 | "jasmine-spec-reporter": "^2.4.0",
62 | "karma": "~0.13.21",
63 | "karma-chrome-launcher": "~0.2.0",
64 | "karma-ie-launcher": "^0.2.0",
65 | "karma-jasmine": "~0.3.6",
66 | "karma-mocha-reporter": "^1.1.1",
67 | "karma-phantomjs2-launcher": "^0.4.0",
68 | "merge-stream": "^1.0.0",
69 | "open": "0.0.5",
70 | "protractor": "^3.0.0",
71 | "rimraf": "^2.5.1",
72 | "run-sequence": "^1.1.0",
73 | "semver": "^5.0.3",
74 | "serve-static": "^1.9.2",
75 | "slash": "~1.0.0",
76 | "stream-series": "^0.1.1",
77 | "systemjs-builder": "^0.15.7",
78 | "tiny-lr": "^0.2.1",
79 | "traceur": "^0.0.91",
80 | "ts-node": "^0.5.4",
81 | "typedoc": "^0.3.12",
82 | "typescript": "~1.7.3",
83 | "typings": "^0.6.2",
84 | "vinyl-buffer": "^1.0.0",
85 | "vinyl-source-stream": "^1.1.0",
86 | "yargs": "^3.32.0"
87 | },
88 | "dependencies": {
89 | "angular2": "2.0.0-beta.6",
90 | "angularfire2": "^2.0.0-alpha.8",
91 | "es6-module-loader": "^0.17.8",
92 | "es6-shim": "^0.33.3",
93 | "firebase": "^2.4.0",
94 | "reflect-metadata": "0.1.2",
95 | "rxjs": "5.0.0-beta.0",
96 | "systemjs": "~0.19.18",
97 | "zone.js": "^0.5.14"
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/protractor.conf.js:
--------------------------------------------------------------------------------
1 | exports.config = {
2 | baseUrl: 'http://localhost:5555',
3 |
4 | specs: [
5 | 'dist/test/e2e/**/*.e2e.js'
6 | ],
7 | exclude: [],
8 |
9 | framework: 'jasmine2',
10 |
11 | allScriptsTimeout: 110000,
12 |
13 | jasmineNodeOpts: {
14 | showTiming: true,
15 | showColors: true,
16 | isVerbose: false,
17 | includeStackTrace: false,
18 | defaultTimeoutInterval: 400000
19 | },
20 | directConnect: true,
21 |
22 | capabilities: {
23 | 'browserName': 'chrome'
24 | },
25 |
26 | onPrepare: function() {
27 | var SpecReporter = require('jasmine-spec-reporter');
28 | // add jasmine spec reporter
29 | jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: true}));
30 |
31 | browser.ignoreSynchronization = false;
32 | },
33 |
34 |
35 | /**
36 | * Angular 2 configuration
37 | *
38 | * useAllAngular2AppRoots: tells Protractor to wait for any angular2 apps on the page instead of just the one matching
39 | * `rootEl`
40 | *
41 | */
42 | useAllAngular2AppRoots: true
43 | };
44 |
--------------------------------------------------------------------------------
/src/about/components/about.html:
--------------------------------------------------------------------------------
1 |
2 | For reward, here is a list of awesome computer scientists!
3 |
4 |
5 |
6 | You want more? Add them yourself!
7 |
8 |
12 |
15 |
--------------------------------------------------------------------------------
/src/about/components/about.ts:
--------------------------------------------------------------------------------
1 | import {Component} from 'angular2/core';
2 | import {CORE_DIRECTIVES, FORM_DIRECTIVES} from 'angular2/common';
3 | import {AngularFire, FirebaseObservable} from 'angularfire2';
4 |
5 | @Component({
6 | selector: 'about',
7 | providers: [],
8 | moduleId: module.id,
9 | templateUrl: './about.html',
10 | directives: [FORM_DIRECTIVES, CORE_DIRECTIVES]
11 | })
12 | export class AboutCmp {
13 | newName: string;
14 | names: FirebaseObservable;
15 | constructor(af:AngularFire) {
16 | this.names = af.list('/scientists');
17 | }
18 | /*
19 | * @param newname any text as input.
20 | * @returns return false to prevent default form submit behavior to refresh the page.
21 | */
22 | addName(): boolean {
23 | this.names.add(this.newName);
24 | this.newName = '';
25 | return false;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/app/components/app.css:
--------------------------------------------------------------------------------
1 | .sample-app-content {
2 | font-family: Verdana;
3 | }
4 | .sample-app-content h1 {
5 | color: #999;
6 | font-size: 3em;
7 | }
8 | .sample-app-content h2 {
9 | color: #990000;
10 | font-size: 2em;
11 | }
12 | .sample-app-content p,
13 | .sample-app-content nav {
14 | padding: 30px;
15 | }
16 | .sample-app-content li,
17 | .sample-app-content p {
18 | font-size: 1.2em;
19 | }
20 | .sample-app-content li {
21 | font-family: Consolas;
22 | }
23 | .sample-app-content nav a {
24 | display: inline-block;
25 | margin-right: 15px;
26 | }
27 | .sample-app-content input,
28 | .sample-app-content button {
29 | padding: 5px;
30 | font-size: 1em;
31 | outline: none;
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/src/app/components/app.e2e.ts:
--------------------------------------------------------------------------------
1 | describe('App', function() {
2 |
3 | beforeEach(function() {
4 | browser.get('');
5 | });
6 |
7 | it('should have a title', function() {
8 | expect(browser.getTitle()).toEqual('My Angular2 App');
9 | });
10 |
11 | it('should have ', function() {
12 | expect(element(by.css('app section')).isPresent()).toEqual(true);
13 | });
14 |
15 | it('should have