├── .DS_Store ├── Dockerfile ├── LICENSE ├── README.md ├── config ├── github-deploy │ └── index.js ├── head-config.common.js ├── helpers.js ├── html-elements-plugin │ └── index.js ├── karma.conf.js ├── modules │ └── angular2-hmr-prod.js ├── protractor.conf.js ├── spec-bundle.js ├── webpack.common.js ├── webpack.dev.js ├── webpack.github-deploy.js ├── webpack.prod.js └── webpack.test.js ├── dist └── webpack-assets.json ├── karma.conf.js ├── package.json ├── protractor.conf.js ├── src ├── .DS_Store ├── .idea │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── jsLibraryMappings.xml │ ├── misc.xml │ ├── modules.xml │ ├── src.iml │ └── workspace.xml ├── app │ ├── .DS_Store │ ├── app.component.ts │ ├── app.e2e.ts │ ├── app.module.ts │ ├── app.resolver.ts │ ├── app.routes.ts │ ├── app.service.ts │ ├── app.spec.ts │ ├── app.style.css │ ├── components │ │ ├── .DS_Store │ │ ├── loading │ │ │ ├── loading.component.ts │ │ │ └── loading.style.css │ │ ├── navbar │ │ │ ├── .DS_Store │ │ │ ├── navbar.component.ts │ │ │ ├── navbar.style.css │ │ │ ├── navbar.template.html │ │ │ └── toggleMinNav.directive.ts │ │ └── sidebar │ │ │ ├── collapseNav.directive.ts │ │ │ ├── sidebar.component.ts │ │ │ ├── sidebar.style.css │ │ │ ├── sidebar.template.html │ │ │ └── slimScroll.directive.ts │ ├── containers │ │ ├── +detail │ │ │ ├── detail.component.ts │ │ │ └── index.ts │ │ ├── .DS_Store │ │ ├── about │ │ │ ├── about.component.ts │ │ │ ├── about.spec.ts │ │ │ └── index.ts │ │ ├── dashboard │ │ │ └── dashboard.component.ts │ │ ├── home │ │ │ ├── home.component.ts │ │ │ ├── home.e2e.ts │ │ │ ├── home.service.ts │ │ │ ├── home.spec.ts │ │ │ ├── home.style.css │ │ │ ├── home.template.html │ │ │ ├── index.ts │ │ │ ├── title │ │ │ │ ├── index.ts │ │ │ │ ├── title.service.ts │ │ │ │ └── title.spec.ts │ │ │ └── x-large │ │ │ │ ├── index.ts │ │ │ │ ├── x-large.directive.ts │ │ │ │ └── x-large.spec.ts │ │ ├── login │ │ │ ├── login.component.ts │ │ │ ├── login.style.css │ │ │ └── login.template.html │ │ └── no-content │ │ │ ├── index.ts │ │ │ └── no-content.ts │ ├── environment.ts │ ├── index.ts │ └── no-content │ │ ├── index.ts │ │ └── no-content.ts ├── assets │ ├── .DS_Store │ ├── css │ │ └── .gitkeep │ ├── data.json │ ├── humans.txt │ ├── icon │ │ ├── android-icon-144x144.png │ │ ├── android-icon-192x192.png │ │ ├── android-icon-36x36.png │ │ ├── android-icon-48x48.png │ │ ├── android-icon-72x72.png │ │ ├── android-icon-96x96.png │ │ ├── apple-icon-114x114.png │ │ ├── apple-icon-120x120.png │ │ ├── apple-icon-144x144.png │ │ ├── apple-icon-152x152.png │ │ ├── apple-icon-180x180.png │ │ ├── apple-icon-57x57.png │ │ ├── apple-icon-60x60.png │ │ ├── apple-icon-72x72.png │ │ ├── apple-icon-76x76.png │ │ ├── apple-icon-precomposed.png │ │ ├── apple-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── ms-icon-144x144.png │ │ ├── ms-icon-150x150.png │ │ ├── ms-icon-310x310.png │ │ └── ms-icon-70x70.png │ ├── img │ │ ├── angular-logo.png │ │ ├── angularclass-avatar.png │ │ └── angularclass-logo.png │ ├── libs │ │ ├── .DS_Store │ │ ├── font-awesome-4.2.0 │ │ │ ├── css │ │ │ │ ├── font-awesome-ie7.min.css │ │ │ │ ├── font-awesome.css │ │ │ │ └── font-awesome.min.css │ │ │ └── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ └── fontawesome-webfont.woff │ │ └── slimscroll │ │ │ ├── .DS_Store │ │ │ └── jquery.slimscroll-1.3.3.min.js │ ├── manifest.json │ ├── mock-data │ │ └── mock-data.json │ ├── robots.txt │ └── service-worker.js ├── custom-typings.d.ts ├── index.html ├── main.browser.ts ├── polyfills.browser.ts └── vendor.browser.ts ├── tsconfig.json ├── tslint.json ├── typedoc.json └── webpack.config.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/.DS_Store -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Builds a Docker to deliver dist/ 2 | FROM nginx:latest 3 | COPY dist/ /usr/share/nginx/html -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2016 AngularClass LLC 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 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### 快速启动 2 | **node 版本 >= 5.0 and NPM >= 3** 3 | 4 | ```bash 5 | 6 | # 如果编译出现异常 ,如: 7 | Variable '$' must be of type 'cssSelectorHelper', but here has type 'JQueryStatic'. 8 | 解决方法: 找到@type/protractor下的index.d.ts,将declare var $: cssSelectorHelper注释掉, 这是jquery的类型跟ng2的类型冲突导致 9 | 10 | # 下载依赖包 11 | npm install 12 | 13 | # 启动服务 14 | npm start 15 | 16 | # 使用热替换 17 | npm run server:dev:hmr 18 | ``` 19 | 访问 [http://0.0.0.0:3000](http://0.0.0.0:3000) or [http://localhost:3000](http://localhost:3000) 20 | 21 | ## 文件结构 22 | ``` 23 | angular2-webpack-starter/ 24 | ├──config/ * our configuration 25 | | ├──helpers.js * helper functions for our configuration files 26 | | ├──spec-bundle.js * ignore this magic that sets up our angular 2 testing environment 27 | | ├──karma.conf.js * karma config for our unit tests 28 | | ├──protractor.conf.js * protractor config for our end-to-end tests 29 | │ ├──webpack.dev.js * our development webpack config 30 | │ ├──webpack.prod.js * our production webpack config 31 | │ └──webpack.test.js * our testing webpack config 32 | │ 33 | ├──src/ * our source files that will be compiled to javascript 34 | | ├──main.browser.ts * our entry file for our browser environment 35 | │ │ 36 | | ├──index.html * Index.html: where we generate our index page 37 | │ │ 38 | | ├──polyfills.ts * our polyfills file 39 | │ │ 40 | | ├──vendor.ts * our vendor file 41 | │ │ 42 | │ ├──app/ * WebApp: folder 43 | │ │ ├──app.spec.ts * a simple test of components in app.ts 44 | │ │ ├──app.e2e.ts * a simple end-to-end test for / 45 | │ │ └──app.ts * App.ts: a simple version of our App component components 46 | │ │ 47 | │ └──assets/ * static assets are served here 48 | │ ├──icon/ * our list of icons from www.favicon-generator.org 49 | │ ├──service-worker.js * ignore this. Web App service worker that's not complete yet 50 | │ ├──robots.txt * for search engines to crawl your website 51 | │ └──humans.txt * for humans to know who the developers are 52 | │ 53 | │ 54 | ├──tslint.json * typescript lint config 55 | ├──typedoc.json * typescript documentation generator 56 | ├──tsconfig.json * config that webpack uses for typescript 57 | ├──package.json * what npm uses to manage it's dependencies 58 | └──webpack.config.js * webpack main configuration file 59 | 60 | ``` 61 | # License 62 | [MIT](/LICENSE) 63 | -------------------------------------------------------------------------------- /config/github-deploy/index.js: -------------------------------------------------------------------------------- 1 | const helpers = require('../helpers'); 2 | const execSync = require('child_process').execSync; 3 | 4 | const REPO_NAME_RE = /Push {2}URL: https:\/\/github\.com\/.*\/(.*)\.git/; 5 | 6 | function getWebpackConfigModule() { 7 | if (helpers.hasProcessFlag('github-dev')) { 8 | return require('../webpack.dev.js'); 9 | } else if (helpers.hasProcessFlag('github-prod')) { 10 | return require('../webpack.prod.js'); 11 | } else { 12 | throw new Error('Invalid compile option.'); 13 | } 14 | } 15 | 16 | function getRepoName(remoteName) { 17 | remoteName = remoteName || 'origin'; 18 | 19 | var stdout = execSync('git remote show ' + remoteName), 20 | match = REPO_NAME_RE.exec(stdout); 21 | 22 | if (!match) { 23 | throw new Error('Could not find a repository on remote ' + remoteName); 24 | } else { 25 | return match[1]; 26 | } 27 | } 28 | 29 | function stripTrailing(str, char) { 30 | 31 | if (str[0] === char) { 32 | str = str.substr(1); 33 | } 34 | 35 | if (str.substr(-1) === char) { 36 | str = str.substr(0, str.length - 1); 37 | } 38 | 39 | return str; 40 | } 41 | 42 | /** 43 | * Given a string remove trailing slashes and adds 1 slash at the end of the string. 44 | * 45 | * Example: 46 | * safeUrl('/value/') 47 | * // 'value/' 48 | * 49 | * @param url 50 | * @returns {string} 51 | */ 52 | function safeUrl(url) { 53 | const stripped = stripTrailing(url || '', '/'); 54 | return stripped ? stripped + '/' : ''; 55 | } 56 | 57 | exports.getWebpackConfigModule = getWebpackConfigModule; 58 | exports.getRepoName = getRepoName; 59 | exports.safeUrl = safeUrl; 60 | -------------------------------------------------------------------------------- /config/head-config.common.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Configuration for head elements added during the creation of index.html. 3 | * 4 | * All href attributes are added the publicPath (if exists) by default. 5 | * You can explicitly hint to prefix a publicPath by setting a boolean value to a key that has 6 | * the same name as the attribute you want to operate on, but prefix with = 7 | * 8 | * Example: 9 | * { name: 'msapplication-TileImage', content: '/assets/icon/ms-icon-144x144.png', '=content': true }, 10 | * Will prefix the publicPath to content. 11 | * 12 | * { rel: 'apple-touch-icon', sizes: '57x57', href: '/assets/icon/apple-icon-57x57.png', '=href': false }, 13 | * Will not prefix the publicPath on href (href attributes are added by default 14 | * 15 | */ 16 | module.exports = { 17 | link: [ 18 | /** tags for 'apple-touch-icon' (AKA Web Clips). **/ 19 | { rel: 'apple-touch-icon', sizes: '57x57', href: '/assets/icon/apple-icon-57x57.png' }, 20 | { rel: 'apple-touch-icon', sizes: '60x60', href: '/assets/icon/apple-icon-60x60.png' }, 21 | { rel: 'apple-touch-icon', sizes: '72x72', href: '/assets/icon/apple-icon-72x72.png' }, 22 | { rel: 'apple-touch-icon', sizes: '76x76', href: '/assets/icon/apple-icon-76x76.png' }, 23 | { rel: 'apple-touch-icon', sizes: '114x114', href: '/assets/icon/apple-icon-114x114.png' }, 24 | { rel: 'apple-touch-icon', sizes: '120x120', href: '/assets/icon/apple-icon-120x120.png' }, 25 | { rel: 'apple-touch-icon', sizes: '144x144', href: '/assets/icon/apple-icon-144x144.png' }, 26 | { rel: 'apple-touch-icon', sizes: '152x152', href: '/assets/icon/apple-icon-152x152.png' }, 27 | { rel: 'apple-touch-icon', sizes: '180x180', href: '/assets/icon/apple-icon-180x180.png' }, 28 | 29 | /** tags for android web app icons **/ 30 | { rel: 'icon', type: 'image/png', sizes: '192x192', href: '/assets/icon/android-icon-192x192.png' }, 31 | 32 | /** tags for favicons **/ 33 | { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/assets/icon/favicon-32x32.png' }, 34 | { rel: 'icon', type: 'image/png', sizes: '96x96', href: '/assets/icon/favicon-96x96.png' }, 35 | { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/assets/icon/favicon-16x16.png' }, 36 | 37 | /** tags for a Web App Manifest **/ 38 | { rel: 'manifest', href: '/assets/manifest.json' } 39 | ], 40 | meta: [ 41 | { name: 'msapplication-TileColor', content: '#00bcd4' }, 42 | { name: 'msapplication-TileImage', content: '/assets/icon/ms-icon-144x144.png', '=content': true }, 43 | { name: 'theme-color', content: '#00bcd4' } 44 | ] 45 | }; 46 | -------------------------------------------------------------------------------- /config/helpers.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | var path = require('path'); 5 | 6 | // Helper functions 7 | var ROOT = path.resolve(__dirname, '..'); 8 | 9 | function hasProcessFlag(flag) { 10 | return process.argv.join('').indexOf(flag) > -1; 11 | } 12 | 13 | function isWebpackDevServer() { 14 | return process.argv[1] && !! (/webpack-dev-server/.exec(process.argv[1])); 15 | } 16 | 17 | function root(args) { 18 | args = Array.prototype.slice.call(arguments, 0); 19 | return path.join.apply(path, [ROOT].concat(args)); 20 | } 21 | 22 | exports.hasProcessFlag = hasProcessFlag; 23 | exports.isWebpackDevServer = isWebpackDevServer; 24 | exports.root = root; 25 | -------------------------------------------------------------------------------- /config/html-elements-plugin/index.js: -------------------------------------------------------------------------------- 1 | 2 | function HtmlElementsPlugin(locations) { 3 | this.locations = locations; 4 | } 5 | 6 | HtmlElementsPlugin.prototype.apply = function(compiler) { 7 | var self = this; 8 | compiler.plugin('compilation', function(compilation) { 9 | compilation.options.htmlElements = compilation.options.htmlElements || {}; 10 | 11 | compilation.plugin('html-webpack-plugin-before-html-generation', function(htmlPluginData, callback) { 12 | const locations = self.locations; 13 | 14 | if (locations) { 15 | const publicPath = htmlPluginData.assets.publicPath; 16 | 17 | Object.getOwnPropertyNames(locations).forEach(function(loc) { 18 | compilation.options.htmlElements[loc] = getHtmlElementString(locations[loc], publicPath); 19 | }); 20 | } 21 | 22 | 23 | callback(null, htmlPluginData); 24 | }); 25 | }); 26 | 27 | }; 28 | 29 | const RE_ENDS_WITH_BS = /\/$/; 30 | 31 | /** 32 | * Create an HTML tag with attributes from a map. 33 | * 34 | * Example: 35 | * createTag('link', { rel: "manifest", href: "/assets/manifest.json" }) 36 | * // 37 | * @param tagName The name of the tag 38 | * @param attrMap A Map of attribute names (keys) and their values. 39 | * @param publicPath a path to add to eh start of static asset url 40 | * @returns {string} 41 | */ 42 | function createTag(tagName, attrMap, publicPath) { 43 | publicPath = publicPath || ''; 44 | 45 | // add trailing slash if we have a publicPath and it doesn't have one. 46 | if (publicPath && !RE_ENDS_WITH_BS.test(publicPath)) { 47 | publicPath += '/'; 48 | } 49 | 50 | const attributes = Object.getOwnPropertyNames(attrMap) 51 | .filter(function(name) { return name[0] !== '='; } ) 52 | .map(function(name) { 53 | var value = attrMap[name]; 54 | 55 | if (publicPath) { 56 | // check if we have explicit instruction, use it if so (e.g: =herf: false) 57 | // if no instruction, use public path if it's href attribute. 58 | const usePublicPath = attrMap.hasOwnProperty('=' + name) ? !!attrMap['=' + name] : name === 'href'; 59 | 60 | if (usePublicPath) { 61 | // remove a starting trailing slash if the value has one so we wont have // 62 | value = publicPath + (value[0] === '/' ? value.substr(1) : value); 63 | } 64 | } 65 | 66 | return name + '="' + value + '"'; 67 | }); 68 | 69 | return '<' + tagName + ' ' + attributes.join(' ') + '>'; 70 | } 71 | 72 | /** 73 | * Returns a string representing all html elements defined in a data source. 74 | * 75 | * Example: 76 | * 77 | * const ds = { 78 | * link: [ 79 | * { rel: "apple-touch-icon", sizes: "57x57", href: "/assets/icon/apple-icon-57x57.png" } 80 | * ], 81 | * meta: [ 82 | * { name: "msapplication-TileColor", content: "#00bcd4" } 83 | * ] 84 | * } 85 | * 86 | * getHeadTags(ds); 87 | * // "" 88 | * "" 89 | * 90 | * @returns {string} 91 | */ 92 | function getHtmlElementString(dataSource, publicPath) { 93 | return Object.getOwnPropertyNames(dataSource) 94 | .map(function(name) { 95 | if (Array.isArray(dataSource[name])) { 96 | return dataSource[name].map(function(attrs) { return createTag(name, attrs, publicPath); } ); 97 | } else { 98 | return [ createTag(name, dataSource[name], publicPath) ]; 99 | } 100 | }) 101 | .reduce(function(arr, curr) { 102 | return arr.concat(curr); 103 | }, []) 104 | .join('\n\t'); 105 | } 106 | module.exports = HtmlElementsPlugin; 107 | -------------------------------------------------------------------------------- /config/karma.conf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | 5 | module.exports = function(config) { 6 | var testWebpackConfig = require('./webpack.test.js')({env: 'test'}); 7 | 8 | var configuration = { 9 | 10 | // base path that will be used to resolve all patterns (e.g. files, exclude) 11 | basePath: '', 12 | 13 | /* 14 | * Frameworks to use 15 | * 16 | * available frameworks: https://npmjs.org/browse/keyword/karma-adapter 17 | */ 18 | frameworks: ['jasmine'], 19 | 20 | // list of files to exclude 21 | exclude: [ ], 22 | 23 | /* 24 | * list of files / patterns to load in the browser 25 | * 26 | * we are building the test environment in ./spec-bundle.js 27 | */ 28 | files: [ { pattern: './config/spec-bundle.js', watched: false } ], 29 | 30 | /* 31 | * preprocess matching files before serving them to the browser 32 | * available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 33 | */ 34 | preprocessors: { './config/spec-bundle.js': ['coverage', 'webpack', 'sourcemap'] }, 35 | 36 | // Webpack Config at ./webpack.test.js 37 | webpack: testWebpackConfig, 38 | 39 | coverageReporter: { 40 | dir : 'coverage/', 41 | reporters: [ 42 | { type: 'text-summary' }, 43 | { type: 'json' }, 44 | { type: 'html' } 45 | ] 46 | }, 47 | 48 | // Webpack please don't spam the console when running in karma! 49 | webpackServer: { noInfo: true }, 50 | 51 | /* 52 | * test results reporter to use 53 | * 54 | * possible values: 'dots', 'progress' 55 | * available reporters: https://npmjs.org/browse/keyword/karma-reporter 56 | */ 57 | reporters: [ 'mocha', 'coverage' ], 58 | 59 | // web server port 60 | port: 9876, 61 | 62 | // enable / disable colors in the output (reporters and logs) 63 | colors: true, 64 | 65 | /* 66 | * level of logging 67 | * possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 68 | */ 69 | logLevel: config.LOG_INFO, 70 | 71 | // enable / disable watching file and executing tests whenever any file changes 72 | autoWatch: false, 73 | 74 | /* 75 | * start these browsers 76 | * available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 77 | */ 78 | browsers: [ 79 | 'Chrome' 80 | ], 81 | 82 | customLaunchers: { 83 | ChromeTravisCi: { 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 | */ 93 | singleRun: true 94 | }; 95 | 96 | if (process.env.TRAVIS){ 97 | configuration.browsers = ['ChromeTravisCi']; 98 | } 99 | 100 | config.set(configuration); 101 | }; 102 | -------------------------------------------------------------------------------- /config/modules/angular2-hmr-prod.js: -------------------------------------------------------------------------------- 1 | exports.HmrState = function() { 2 | 3 | }; 4 | -------------------------------------------------------------------------------- /config/protractor.conf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | 5 | require('ts-node/register'); 6 | var helpers = require('./helpers'); 7 | 8 | exports.config = { 9 | baseUrl: 'http://localhost:3000/', 10 | 11 | // use `npm run e2e` 12 | specs: [ 13 | helpers.root('src/**/**.e2e.ts'), 14 | helpers.root('src/**/*.e2e.ts') 15 | ], 16 | exclude: [], 17 | 18 | framework: 'jasmine2', 19 | 20 | allScriptsTimeout: 110000, 21 | 22 | jasmineNodeOpts: { 23 | showTiming: true, 24 | showColors: true, 25 | isVerbose: false, 26 | includeStackTrace: false, 27 | defaultTimeoutInterval: 400000 28 | }, 29 | directConnect: true, 30 | 31 | capabilities: { 32 | 'browserName': 'chrome', 33 | 'chromeOptions': { 34 | 'args': ['show-fps-counter=true'] 35 | } 36 | }, 37 | 38 | onPrepare: function() { 39 | browser.ignoreSynchronization = true; 40 | }, 41 | 42 | /** 43 | * Angular 2 configuration 44 | * 45 | * useAllAngular2AppRoots: tells Protractor to wait for any angular2 apps on the page instead of just the one matching 46 | * `rootEl` 47 | */ 48 | useAllAngular2AppRoots: true 49 | }; 50 | -------------------------------------------------------------------------------- /config/spec-bundle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | 5 | /* 6 | * When testing with webpack and ES6, we have to do some extra 7 | * things to get testing to work right. Because we are gonna write tests 8 | * in ES6 too, we have to compile those as well. That's handled in 9 | * karma.conf.js with the karma-webpack plugin. This is the entry 10 | * file for webpack test. Just like webpack will create a bundle.js 11 | * file for our client, when we run test, it will compile and bundle them 12 | * all here! Crazy huh. So we need to do some setup 13 | */ 14 | Error.stackTraceLimit = Infinity; 15 | 16 | require('core-js/es6'); 17 | require('core-js/es7/reflect'); 18 | 19 | // Typescript emit helpers polyfill 20 | require('ts-helpers'); 21 | 22 | require('zone.js/dist/zone'); 23 | require('zone.js/dist/long-stack-trace-zone'); 24 | require('zone.js/dist/proxy'); // since zone.js 0.6.15 25 | require('zone.js/dist/sync-test'); 26 | require('zone.js/dist/jasmine-patch'); // put here since zone.js 0.6.14 27 | require('zone.js/dist/async-test'); 28 | require('zone.js/dist/fake-async-test'); 29 | 30 | // RxJS 31 | require('rxjs/Rx'); 32 | 33 | var testing = require('@angular/core/testing'); 34 | var browser = require('@angular/platform-browser-dynamic/testing'); 35 | 36 | testing.TestBed.initTestEnvironment( 37 | browser.BrowserDynamicTestingModule, 38 | browser.platformBrowserDynamicTesting() 39 | ); 40 | 41 | /* 42 | * Ok, this is kinda crazy. We can use the context method on 43 | * require that webpack created in order to tell webpack 44 | * what files we actually want to require or import. 45 | * Below, context will be a function/object with file names as keys. 46 | * Using that regex we are saying look in ../src then find 47 | * any file that ends with spec.ts and get its path. By passing in true 48 | * we say do this recursively 49 | */ 50 | var testContext = require.context('../src', true, /\.spec\.ts/); 51 | 52 | /* 53 | * get all the files, for each file, call the context function 54 | * that will require the file and load it up here. Context will 55 | * loop and require those spec files here 56 | */ 57 | function requireAll(requireContext) { 58 | return requireContext.keys().map(requireContext); 59 | } 60 | 61 | // requires and returns all modules that match 62 | var modules = requireAll(testContext); 63 | -------------------------------------------------------------------------------- /config/webpack.common.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | 5 | const webpack = require('webpack'); 6 | const helpers = require('./helpers'); 7 | 8 | /* 9 | * Webpack Plugins 10 | */ 11 | // problem with copy-webpack-plugin 12 | const ProvidePlugin = require('webpack/lib/ProvidePlugin'); 13 | const CopyWebpackPlugin = require('copy-webpack-plugin'); 14 | const HtmlWebpackPlugin = require('html-webpack-plugin'); 15 | const ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin; 16 | const HtmlElementsPlugin = require('./html-elements-plugin'); 17 | const AssetsPlugin = require('assets-webpack-plugin'); 18 | const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin'); 19 | 20 | /* 21 | * Webpack Constants 22 | */ 23 | const HMR = helpers.hasProcessFlag('hot'); 24 | const METADATA = { 25 | title: 'Angular2 Webpack Starter by @gdi2290 from @AngularClass', 26 | baseUrl: '/', 27 | isDevServer: helpers.isWebpackDevServer() 28 | }; 29 | 30 | /* 31 | * Webpack configuration 32 | * 33 | * See: http://webpack.github.io/docs/configuration.html#cli 34 | */ 35 | module.exports = function(options) { 36 | isProd = options.env === 'production'; 37 | return { 38 | 39 | /* 40 | * Static metadata for index.html 41 | * 42 | * See: (custom attribute) 43 | */ 44 | metadata: METADATA, 45 | 46 | /* 47 | * Cache generated modules and chunks to improve performance for multiple incremental builds. 48 | * This is enabled by default in watch mode. 49 | * You can pass false to disable it. 50 | * 51 | * See: http://webpack.github.io/docs/configuration.html#cache 52 | */ 53 | //cache: false, 54 | 55 | /* 56 | * The entry point for the bundle 57 | * Our Angular.js app 58 | * 59 | * See: http://webpack.github.io/docs/configuration.html#entry 60 | */ 61 | entry: { 62 | 63 | 'polyfills': './src/polyfills.browser.ts', 64 | 'vendor': './src/vendor.browser.ts', 65 | 'main': './src/main.browser.ts' 66 | 67 | }, 68 | 69 | /* 70 | * Options affecting the resolving of modules. 71 | * 72 | * See: http://webpack.github.io/docs/configuration.html#resolve 73 | */ 74 | resolve: { 75 | 76 | /* 77 | * An array of extensions that should be used to resolve modules. 78 | * 79 | * See: http://webpack.github.io/docs/configuration.html#resolve-extensions 80 | */ 81 | extensions: ['', '.ts', '.js', '.json'], 82 | 83 | // Make sure root is src 84 | root: helpers.root('src'), 85 | 86 | // remove other default values 87 | modulesDirectories: ['node_modules'], 88 | 89 | }, 90 | 91 | /* 92 | * Options affecting the normal modules. 93 | * 94 | * See: http://webpack.github.io/docs/configuration.html#module 95 | */ 96 | module: { 97 | 98 | /* 99 | * An array of applied pre and post loaders. 100 | * 101 | * See: http://webpack.github.io/docs/configuration.html#module-preloaders-module-postloaders 102 | */ 103 | preLoaders: [ 104 | { 105 | test: /\.ts$/, 106 | loader: 'string-replace-loader', 107 | query: { 108 | search: '(System|SystemJS)(.*[\\n\\r]\\s*\\.|\\.)import\\((.+)\\)', 109 | replace: '$1.import($3).then(mod => (mod.__esModule && mod.default) ? mod.default : mod)', 110 | flags: 'g' 111 | }, 112 | include: [helpers.root('src')] 113 | }, 114 | 115 | ], 116 | 117 | /* 118 | * An array of automatically applied loaders. 119 | * 120 | * IMPORTANT: The loaders here are resolved relative to the resource which they are applied to. 121 | * This means they are not resolved relative to the configuration file. 122 | * 123 | * See: http://webpack.github.io/docs/configuration.html#module-loaders 124 | */ 125 | loaders: [ 126 | 127 | /* 128 | * Typescript loader support for .ts and Angular 2 async routes via .async.ts 129 | * Replace templateUrl and stylesUrl with require() 130 | * 131 | * See: https://github.com/s-panferov/awesome-typescript-loader 132 | * See: https://github.com/TheLarkInn/angular2-template-loader 133 | */ 134 | { 135 | test: /\.ts$/, 136 | loaders: [ 137 | '@angularclass/hmr-loader?pretty=' + !isProd + '&prod=' + isProd, 138 | 'awesome-typescript-loader', 139 | 'angular2-template-loader' 140 | ], 141 | exclude: [/\.(spec|e2e)\.ts$/] 142 | }, 143 | 144 | /* 145 | * Json loader support for *.json files. 146 | * 147 | * See: https://github.com/webpack/json-loader 148 | */ 149 | { 150 | test: /\.json$/, 151 | loader: 'json-loader' 152 | }, 153 | 154 | /* 155 | * to string and css loader support for *.css files 156 | * Returns file content as string 157 | * 158 | */ 159 | { 160 | test: /\.css$/, 161 | loaders: ['to-string-loader', 'css-loader'] 162 | }, 163 | 164 | /* Raw loader support for *.html 165 | * Returns file content as string 166 | * 167 | * See: https://github.com/webpack/raw-loader 168 | */ 169 | { 170 | test: /\.html$/, 171 | loader: 'raw-loader', 172 | exclude: [helpers.root('src/index.html')] 173 | }, 174 | 175 | /* File loader for supporting images, for example, in CSS files. 176 | */ 177 | { 178 | test: /\.(jpg|png|gif)$/, 179 | loader: 'file' 180 | } 181 | ], 182 | 183 | postLoaders: [ 184 | { 185 | test: /\.js$/, 186 | loader: 'string-replace-loader', 187 | query: { 188 | search: 'var sourceMappingUrl = extractSourceMappingUrl\\(cssText\\);', 189 | replace: 'var sourceMappingUrl = "";', 190 | flags: 'g' 191 | } 192 | } 193 | ] 194 | }, 195 | 196 | /* 197 | * Add additional plugins to the compiler. 198 | * 199 | * See: http://webpack.github.io/docs/configuration.html#plugins 200 | */ 201 | plugins: [ 202 | new ProvidePlugin({ 203 | jQuery: 'jquery', 204 | $: 'jquery', 205 | jquery: 'jquery' 206 | }), 207 | 208 | new AssetsPlugin({ 209 | path: helpers.root('dist'), 210 | filename: 'webpack-assets.json', 211 | prettyPrint: true 212 | }), 213 | 214 | /* 215 | * Plugin: ForkCheckerPlugin 216 | * Description: Do type checking in a separate process, so webpack don't need to wait. 217 | * 218 | * See: https://github.com/s-panferov/awesome-typescript-loader#forkchecker-boolean-defaultfalse 219 | */ 220 | new ForkCheckerPlugin(), 221 | /* 222 | * Plugin: CommonsChunkPlugin 223 | * Description: Shares common code between the pages. 224 | * It identifies common modules and put them into a commons chunk. 225 | * 226 | * See: https://webpack.github.io/docs/list-of-plugins.html#commonschunkplugin 227 | * See: https://github.com/webpack/docs/wiki/optimization#multi-page-app 228 | */ 229 | new webpack.optimize.CommonsChunkPlugin({ 230 | name: ['polyfills', 'vendor'].reverse() 231 | }), 232 | 233 | /** 234 | * Plugin: ContextReplacementPlugin 235 | * Description: Provides context to Angular's use of System.import 236 | * 237 | * See: https://webpack.github.io/docs/list-of-plugins.html#contextreplacementplugin 238 | * See: https://github.com/angular/angular/issues/11580 239 | */ 240 | new ContextReplacementPlugin( 241 | // The (\\|\/) piece accounts for path separators in *nix and Windows 242 | /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/, 243 | helpers.root('src') // location of your src 244 | ), 245 | 246 | /* 247 | * Plugin: CopyWebpackPlugin 248 | * Description: Copy files and directories in webpack. 249 | * 250 | * Copies project static assets. 251 | * 252 | * See: https://www.npmjs.com/package/copy-webpack-plugin 253 | */ 254 | new CopyWebpackPlugin([{ 255 | from: 'src/assets', 256 | to: 'assets' 257 | }, 258 | { 259 | from: 'node_modules/bootstrap/dist', 260 | to: 'assets/libs' 261 | } 262 | ]), 263 | 264 | /* 265 | * Plugin: HtmlWebpackPlugin 266 | * Description: Simplifies creation of HTML files to serve your webpack bundles. 267 | * This is especially useful for webpack bundles that include a hash in the filename 268 | * which changes every compilation. 269 | * 270 | * See: https://github.com/ampedandwired/html-webpack-plugin 271 | */ 272 | new HtmlWebpackPlugin({ 273 | template: 'src/index.html', 274 | chunksSortMode: 'dependency' 275 | }), 276 | 277 | /* 278 | * Plugin: HtmlHeadConfigPlugin 279 | * Description: Generate html tags based on javascript maps. 280 | * 281 | * If a publicPath is set in the webpack output configuration, it will be automatically added to 282 | * href attributes, you can disable that by adding a "=href": false property. 283 | * You can also enable it to other attribute by settings "=attName": true. 284 | * 285 | * The configuration supplied is map between a location (key) and an element definition object (value) 286 | * The location (key) is then exported to the template under then htmlElements property in webpack configuration. 287 | * 288 | * Example: 289 | * Adding this plugin configuration 290 | * new HtmlElementsPlugin({ 291 | * headTags: { ... } 292 | * }) 293 | * 294 | * Means we can use it in the template like this: 295 | * <%= webpackConfig.htmlElements.headTags %> 296 | * 297 | * Dependencies: HtmlWebpackPlugin 298 | */ 299 | new HtmlElementsPlugin({ 300 | headTags: require('./head-config.common') 301 | }), 302 | 303 | ], 304 | 305 | /* 306 | * Include polyfills or mocks for various node stuff 307 | * Description: Node configuration 308 | * 309 | * See: https://webpack.github.io/docs/configuration.html#node 310 | */ 311 | node: { 312 | global: 'window', 313 | crypto: 'empty', 314 | process: true, 315 | module: false, 316 | clearImmediate: false, 317 | setImmediate: false 318 | } 319 | 320 | }; 321 | } 322 | -------------------------------------------------------------------------------- /config/webpack.dev.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | 5 | const helpers = require('./helpers'); 6 | const webpackMerge = require('webpack-merge'); // used to merge webpack configs 7 | const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev 8 | 9 | /** 10 | * Webpack Plugins 11 | */ 12 | const DefinePlugin = require('webpack/lib/DefinePlugin'); 13 | const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin'); 14 | 15 | /** 16 | * Webpack Constants 17 | */ 18 | const ENV = process.env.ENV = process.env.NODE_ENV = 'development'; 19 | const HOST = process.env.HOST || 'localhost'; 20 | const PORT = process.env.PORT || 3000; 21 | const HMR = helpers.hasProcessFlag('hot'); 22 | const METADATA = webpackMerge(commonConfig({env: ENV}).metadata, { 23 | host: HOST, 24 | port: PORT, 25 | ENV: ENV, 26 | HMR: HMR 27 | }); 28 | 29 | /** 30 | * Webpack configuration 31 | * 32 | * See: http://webpack.github.io/docs/configuration.html#cli 33 | */ 34 | module.exports = function(options) { 35 | return webpackMerge(commonConfig({env: ENV}), { 36 | 37 | /** 38 | * Merged metadata from webpack.common.js for index.html 39 | * 40 | * See: (custom attribute) 41 | */ 42 | metadata: METADATA, 43 | 44 | /** 45 | * Switch loaders to debug mode. 46 | * 47 | * See: http://webpack.github.io/docs/configuration.html#debug 48 | */ 49 | debug: true, 50 | 51 | /** 52 | * Developer tool to enhance debugging 53 | * 54 | * See: http://webpack.github.io/docs/configuration.html#devtool 55 | * See: https://github.com/webpack/docs/wiki/build-performance#sourcemaps 56 | */ 57 | devtool: 'cheap-module-source-map', 58 | 59 | /** 60 | * Options affecting the output of the compilation. 61 | * 62 | * See: http://webpack.github.io/docs/configuration.html#output 63 | */ 64 | output: { 65 | 66 | /** 67 | * The output directory as absolute path (required). 68 | * 69 | * See: http://webpack.github.io/docs/configuration.html#output-path 70 | */ 71 | path: helpers.root('dist'), 72 | 73 | /** 74 | * Specifies the name of each output file on disk. 75 | * IMPORTANT: You must not specify an absolute path here! 76 | * 77 | * See: http://webpack.github.io/docs/configuration.html#output-filename 78 | */ 79 | filename: '[name].bundle.js', 80 | 81 | /** 82 | * The filename of the SourceMaps for the JavaScript files. 83 | * They are inside the output.path directory. 84 | * 85 | * See: http://webpack.github.io/docs/configuration.html#output-sourcemapfilename 86 | */ 87 | sourceMapFilename: '[name].map', 88 | 89 | /** The filename of non-entry chunks as relative path 90 | * inside the output.path directory. 91 | * 92 | * See: http://webpack.github.io/docs/configuration.html#output-chunkfilename 93 | */ 94 | chunkFilename: '[id].chunk.js', 95 | 96 | library: 'ac_[name]', 97 | libraryTarget: 'var', 98 | }, 99 | 100 | plugins: [ 101 | 102 | /** 103 | * Plugin: DefinePlugin 104 | * Description: Define free variables. 105 | * Useful for having development builds with debug logging or adding global constants. 106 | * 107 | * Environment helpers 108 | * 109 | * See: https://webpack.github.io/docs/list-of-plugins.html#defineplugin 110 | */ 111 | // NOTE: when adding more properties, make sure you include them in custom-typings.d.ts 112 | new DefinePlugin({ 113 | 'ENV': JSON.stringify(METADATA.ENV), 114 | 'HMR': METADATA.HMR, 115 | 'process.env': { 116 | 'ENV': JSON.stringify(METADATA.ENV), 117 | 'NODE_ENV': JSON.stringify(METADATA.ENV), 118 | 'HMR': METADATA.HMR, 119 | } 120 | }), 121 | 122 | /** 123 | * Plugin: NamedModulesPlugin (experimental) 124 | * Description: Uses file names as module name. 125 | * 126 | * See: https://github.com/webpack/webpack/commit/a04ffb928365b19feb75087c63f13cadfc08e1eb 127 | */ 128 | new NamedModulesPlugin(), 129 | 130 | ], 131 | 132 | /** 133 | * Static analysis linter for TypeScript advanced options configuration 134 | * Description: An extensible linter for the TypeScript language. 135 | * 136 | * See: https://github.com/wbuchwalter/tslint-loader 137 | */ 138 | tslint: { 139 | emitErrors: false, 140 | failOnHint: false, 141 | resourcePath: 'src' 142 | }, 143 | 144 | /** 145 | * Webpack Development Server configuration 146 | * Description: The webpack-dev-server is a little node.js Express server. 147 | * The server emits information about the compilation state to the client, 148 | * which reacts to those events. 149 | * 150 | * See: https://webpack.github.io/docs/webpack-dev-server.html 151 | */ 152 | devServer: { 153 | port: METADATA.port, 154 | host: METADATA.host, 155 | historyApiFallback: true, 156 | watchOptions: { 157 | aggregateTimeout: 300, 158 | poll: 1000 159 | }, 160 | outputPath: helpers.root('dist') 161 | }, 162 | 163 | /* 164 | * Include polyfills or mocks for various node stuff 165 | * Description: Node configuration 166 | * 167 | * See: https://webpack.github.io/docs/configuration.html#node 168 | */ 169 | node: { 170 | global: 'window', 171 | crypto: 'empty', 172 | process: true, 173 | module: false, 174 | clearImmediate: false, 175 | setImmediate: false 176 | } 177 | 178 | }); 179 | } 180 | -------------------------------------------------------------------------------- /config/webpack.github-deploy.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | const helpers = require('./helpers'); 5 | const ghDeploy = require('./github-deploy'); 6 | const webpackMerge = require('webpack-merge'); // used to merge webpack configs 7 | const ghpages = require('gh-pages'); 8 | const webpackConfig = ghDeploy.getWebpackConfigModule(); // the settings that are common to prod and dev 9 | 10 | 11 | /** 12 | * Webpack Constants 13 | */ 14 | const GIT_REMOTE_NAME = 'origin'; 15 | const COMMIT_MESSAGE = 'Updates'; 16 | const GH_REPO_NAME = ghDeploy.getRepoName(GIT_REMOTE_NAME); 17 | 18 | const METADATA = webpackMerge(webpackConfig.metadata, { 19 | /** 20 | * Prefixing the REPO name to the baseUrl for router support. 21 | * This also means all resource URIs (CSS/Images/JS) will have this prefix added by the browser 22 | * unless they are absolute (start with '/'). We will handle it via `output.publicPath` 23 | */ 24 | baseUrl: '/' + GH_REPO_NAME + '/' + ghDeploy.safeUrl(webpackConfig.metadata.baseUrl) 25 | }); 26 | 27 | module.exports = webpackMerge(webpackConfig, { 28 | /** 29 | * Merged metadata from webpack.common.js for index.html 30 | * 31 | * See: (custom attribute) 32 | */ 33 | metadata: METADATA, 34 | 35 | 36 | output: { 37 | /** 38 | * The public path is set to the REPO name. 39 | * 40 | * `HtmlElementsPlugin` will add it to all resources url's created by it. 41 | * `HtmlWebpackPlugin` will add it to all webpack bundels/chunks. 42 | * 43 | * In theory publicPath shouldn't be used since the browser should automatically prefix the 44 | * `baseUrl` into all URLs, however this is not the case when the URL is absolute (start with /) 45 | * 46 | * It's important to prefix & suffix the repo name with a slash (/). 47 | * Prefixing so every resource will be absolute (otherwise it will be url.com/repoName/repoName... 48 | * Suffixing since chunks will not do it automatically (testes against about page) 49 | */ 50 | publicPath: '/' + GH_REPO_NAME + '/' + ghDeploy.safeUrl(webpackConfig.output.publicPath) 51 | }, 52 | 53 | plugins: [ 54 | function() { 55 | this.plugin('done', function(stats) { 56 | console.log('Starting deployment to GitHub.'); 57 | 58 | const logger = function (msg) { 59 | console.log(msg); 60 | }; 61 | 62 | const options = { 63 | logger: logger, 64 | remote: GIT_REMOTE_NAME, 65 | message: COMMIT_MESSAGE 66 | }; 67 | 68 | ghpages.publish(webpackConfig.output.path, options, function(err) { 69 | if (err) { 70 | console.log('GitHub deployment done. STATUS: ERROR.'); 71 | throw err; 72 | } else { 73 | console.log('GitHub deployment done. STATUS: SUCCESS.'); 74 | } 75 | }); 76 | }); 77 | } 78 | ] 79 | }); 80 | -------------------------------------------------------------------------------- /config/webpack.prod.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | 5 | const helpers = require('./helpers'); 6 | const webpackMerge = require('webpack-merge'); // used to merge webpack configs 7 | const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev 8 | 9 | /** 10 | * Webpack Plugins 11 | */ 12 | const ProvidePlugin = require('webpack/lib/ProvidePlugin'); 13 | const DefinePlugin = require('webpack/lib/DefinePlugin'); 14 | const NormalModuleReplacementPlugin = require('webpack/lib/NormalModuleReplacementPlugin'); 15 | const IgnorePlugin = require('webpack/lib/IgnorePlugin'); 16 | const DedupePlugin = require('webpack/lib/optimize/DedupePlugin'); 17 | const UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin'); 18 | const WebpackMd5Hash = require('webpack-md5-hash'); 19 | 20 | /** 21 | * Webpack Constants 22 | */ 23 | const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; 24 | const HOST = process.env.HOST || 'localhost'; 25 | const PORT = process.env.PORT || 8080; 26 | const METADATA = webpackMerge(commonConfig({env: ENV}).metadata, { 27 | host: HOST, 28 | port: PORT, 29 | ENV: ENV, 30 | HMR: false 31 | }); 32 | 33 | module.exports = function(env) { 34 | return webpackMerge(commonConfig({env: ENV}), { 35 | 36 | /** 37 | * Switch loaders to debug mode. 38 | * 39 | * See: http://webpack.github.io/docs/configuration.html#debug 40 | */ 41 | debug: false, 42 | 43 | /** 44 | * Developer tool to enhance debugging 45 | * 46 | * See: http://webpack.github.io/docs/configuration.html#devtool 47 | * See: https://github.com/webpack/docs/wiki/build-performance#sourcemaps 48 | */ 49 | devtool: 'source-map', 50 | 51 | /** 52 | * Options affecting the output of the compilation. 53 | * 54 | * See: http://webpack.github.io/docs/configuration.html#output 55 | */ 56 | output: { 57 | 58 | /** 59 | * The output directory as absolute path (required). 60 | * 61 | * See: http://webpack.github.io/docs/configuration.html#output-path 62 | */ 63 | path: helpers.root('dist'), 64 | 65 | /** 66 | * Specifies the name of each output file on disk. 67 | * IMPORTANT: You must not specify an absolute path here! 68 | * 69 | * See: http://webpack.github.io/docs/configuration.html#output-filename 70 | */ 71 | filename: '[name].[chunkhash].bundle.js', 72 | 73 | /** 74 | * The filename of the SourceMaps for the JavaScript files. 75 | * They are inside the output.path directory. 76 | * 77 | * See: http://webpack.github.io/docs/configuration.html#output-sourcemapfilename 78 | */ 79 | sourceMapFilename: '[name].[chunkhash].bundle.map', 80 | 81 | /** 82 | * The filename of non-entry chunks as relative path 83 | * inside the output.path directory. 84 | * 85 | * See: http://webpack.github.io/docs/configuration.html#output-chunkfilename 86 | */ 87 | chunkFilename: '[id].[chunkhash].chunk.js' 88 | 89 | }, 90 | 91 | /** 92 | * Add additional plugins to the compiler. 93 | * 94 | * See: http://webpack.github.io/docs/configuration.html#plugins 95 | */ 96 | plugins: [ 97 | 98 | /** 99 | * Plugin: WebpackMd5Hash 100 | * Description: Plugin to replace a standard webpack chunkhash with md5. 101 | * 102 | * See: https://www.npmjs.com/package/webpack-md5-hash 103 | */ 104 | new WebpackMd5Hash(), 105 | 106 | /** 107 | * Plugin: DedupePlugin 108 | * Description: Prevents the inclusion of duplicate code into your bundle 109 | * and instead applies a copy of the function at runtime. 110 | * 111 | * See: https://webpack.github.io/docs/list-of-plugins.html#defineplugin 112 | * See: https://github.com/webpack/docs/wiki/optimization#deduplication 113 | */ 114 | // new DedupePlugin(), // see: https://github.com/angular/angular-cli/issues/1587 115 | 116 | /** 117 | * Plugin: DefinePlugin 118 | * Description: Define free variables. 119 | * Useful for having development builds with debug logging or adding global constants. 120 | * 121 | * Environment helpers 122 | * 123 | * See: https://webpack.github.io/docs/list-of-plugins.html#defineplugin 124 | */ 125 | // NOTE: when adding more properties make sure you include them in custom-typings.d.ts 126 | new DefinePlugin({ 127 | 'ENV': JSON.stringify(METADATA.ENV), 128 | 'HMR': METADATA.HMR, 129 | 'process.env': { 130 | 'ENV': JSON.stringify(METADATA.ENV), 131 | 'NODE_ENV': JSON.stringify(METADATA.ENV), 132 | 'HMR': METADATA.HMR, 133 | } 134 | }), 135 | 136 | /** 137 | * Plugin: UglifyJsPlugin 138 | * Description: Minimize all JavaScript output of chunks. 139 | * Loaders are switched into minimizing mode. 140 | * 141 | * See: https://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin 142 | */ 143 | // NOTE: To debug prod builds uncomment //debug lines and comment //prod lines 144 | new UglifyJsPlugin({ 145 | // beautify: true, //debug 146 | // mangle: false, //debug 147 | // dead_code: false, //debug 148 | // unused: false, //debug 149 | // deadCode: false, //debug 150 | // compress: { 151 | // screw_ie8: true, 152 | // keep_fnames: true, 153 | // drop_debugger: false, 154 | // dead_code: false, 155 | // unused: false 156 | // }, // debug 157 | // comments: true, //debug 158 | 159 | 160 | beautify: false, //prod 161 | mangle: { screw_ie8 : true, keep_fnames: true }, //prod 162 | compress: { screw_ie8: true }, //prod 163 | comments: false //prod 164 | }), 165 | 166 | /** 167 | * Plugin: NormalModuleReplacementPlugin 168 | * Description: Replace resources that matches resourceRegExp with newResource 169 | * 170 | * See: http://webpack.github.io/docs/list-of-plugins.html#normalmodulereplacementplugin 171 | */ 172 | 173 | new NormalModuleReplacementPlugin( 174 | /angular2-hmr/, 175 | helpers.root('config/modules/angular2-hmr-prod.js') 176 | ), 177 | 178 | /** 179 | * Plugin: IgnorePlugin 180 | * Description: Don’t generate modules for requests matching the provided RegExp. 181 | * 182 | * See: http://webpack.github.io/docs/list-of-plugins.html#ignoreplugin 183 | */ 184 | 185 | // new IgnorePlugin(/angular2-hmr/), 186 | 187 | /** 188 | * Plugin: CompressionPlugin 189 | * Description: Prepares compressed versions of assets to serve 190 | * them with Content-Encoding 191 | * 192 | * See: https://github.com/webpack/compression-webpack-plugin 193 | */ 194 | // install compression-webpack-plugin 195 | // new CompressionPlugin({ 196 | // regExp: /\.css$|\.html$|\.js$|\.map$/, 197 | // threshold: 2 * 1024 198 | // }) 199 | 200 | ], 201 | 202 | /** 203 | * Static analysis linter for TypeScript advanced options configuration 204 | * Description: An extensible linter for the TypeScript language. 205 | * 206 | * See: https://github.com/wbuchwalter/tslint-loader 207 | */ 208 | tslint: { 209 | emitErrors: true, 210 | failOnHint: true, 211 | resourcePath: 'src' 212 | }, 213 | 214 | /** 215 | * Html loader advanced options 216 | * 217 | * See: https://github.com/webpack/html-loader#advanced-options 218 | */ 219 | // TODO: Need to workaround Angular 2's html syntax => #id [bind] (event) *ngFor 220 | htmlLoader: { 221 | minimize: true, 222 | removeAttributeQuotes: false, 223 | caseSensitive: true, 224 | customAttrSurround: [ 225 | [/#/, /(?:)/], 226 | [/\*/, /(?:)/], 227 | [/\[?\(?/, /(?:)/] 228 | ], 229 | customAttrAssign: [/\)?\]?=/] 230 | }, 231 | 232 | /* 233 | * Include polyfills or mocks for various node stuff 234 | * Description: Node configuration 235 | * 236 | * See: https://webpack.github.io/docs/configuration.html#node 237 | */ 238 | node: { 239 | global: 'window', 240 | crypto: 'empty', 241 | process: false, 242 | module: false, 243 | clearImmediate: false, 244 | setImmediate: false 245 | } 246 | 247 | }); 248 | } 249 | -------------------------------------------------------------------------------- /config/webpack.test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | 5 | const helpers = require('./helpers'); 6 | 7 | /** 8 | * Webpack Plugins 9 | */ 10 | const ProvidePlugin = require('webpack/lib/ProvidePlugin'); 11 | const DefinePlugin = require('webpack/lib/DefinePlugin'); 12 | 13 | /** 14 | * Webpack Constants 15 | */ 16 | const ENV = process.env.ENV = process.env.NODE_ENV = 'test'; 17 | 18 | /** 19 | * Webpack configuration 20 | * 21 | * See: http://webpack.github.io/docs/configuration.html#cli 22 | */ 23 | module.exports = function(options) { 24 | return { 25 | 26 | /** 27 | * Source map for Karma from the help of karma-sourcemap-loader & karma-webpack 28 | * 29 | * Do not change, leave as is or it wont work. 30 | * See: https://github.com/webpack/karma-webpack#source-maps 31 | */ 32 | devtool: 'inline-source-map', 33 | 34 | /** 35 | * Options affecting the resolving of modules. 36 | * 37 | * See: http://webpack.github.io/docs/configuration.html#resolve 38 | */ 39 | resolve: { 40 | 41 | /** 42 | * An array of extensions that should be used to resolve modules. 43 | * 44 | * See: http://webpack.github.io/docs/configuration.html#resolve-extensions 45 | */ 46 | extensions: ['', '.ts', '.js'], 47 | 48 | /** 49 | * Make sure root is src 50 | */ 51 | root: helpers.root('src'), 52 | 53 | }, 54 | 55 | /** 56 | * Options affecting the normal modules. 57 | * 58 | * See: http://webpack.github.io/docs/configuration.html#module 59 | */ 60 | module: { 61 | 62 | /** 63 | * An array of applied pre and post loaders. 64 | * 65 | * See: http://webpack.github.io/docs/configuration.html#module-preloaders-module-postloaders 66 | */ 67 | preLoaders: [ 68 | 69 | /** 70 | * Tslint loader support for *.ts files 71 | * 72 | * See: https://github.com/wbuchwalter/tslint-loader 73 | */ 74 | { 75 | test: /\.ts$/, 76 | loader: 'tslint-loader', 77 | exclude: [helpers.root('node_modules')] 78 | }, 79 | 80 | /** 81 | * Source map loader support for *.js files 82 | * Extracts SourceMaps for source files that as added as sourceMappingURL comment. 83 | * 84 | * See: https://github.com/webpack/source-map-loader 85 | */ 86 | { 87 | test: /\.js$/, 88 | loader: 'source-map-loader', 89 | exclude: [ 90 | // these packages have problems with their sourcemaps 91 | helpers.root('node_modules/rxjs'), 92 | helpers.root('node_modules/@angular') 93 | ]} 94 | 95 | ], 96 | 97 | /** 98 | * An array of automatically applied loaders. 99 | * 100 | * IMPORTANT: The loaders here are resolved relative to the resource which they are applied to. 101 | * This means they are not resolved relative to the configuration file. 102 | * 103 | * See: http://webpack.github.io/docs/configuration.html#module-loaders 104 | */ 105 | loaders: [ 106 | 107 | /** 108 | * Typescript loader support for .ts and Angular 2 async routes via .async.ts 109 | * 110 | * See: https://github.com/s-panferov/awesome-typescript-loader 111 | */ 112 | { 113 | test: /\.ts$/, 114 | loader: 'awesome-typescript-loader', 115 | query: { 116 | compilerOptions: { 117 | 118 | // Remove TypeScript helpers to be injected 119 | // below by DefinePlugin 120 | removeComments: true 121 | 122 | } 123 | }, 124 | exclude: [/\.e2e\.ts$/] 125 | }, 126 | 127 | /** 128 | * Json loader support for *.json files. 129 | * 130 | * See: https://github.com/webpack/json-loader 131 | */ 132 | { test: /\.json$/, loader: 'json-loader', exclude: [helpers.root('src/index.html')] }, 133 | 134 | /** 135 | * Raw loader support for *.css files 136 | * Returns file content as string 137 | * 138 | * See: https://github.com/webpack/raw-loader 139 | */ 140 | { test: /\.css$/, loaders: ['to-string-loader', 'css-loader'], exclude: [helpers.root('src/index.html')] }, 141 | 142 | /** 143 | * Raw loader support for *.html 144 | * Returns file content as string 145 | * 146 | * See: https://github.com/webpack/raw-loader 147 | */ 148 | { test: /\.html$/, loader: 'raw-loader', exclude: [helpers.root('src/index.html')] } 149 | 150 | ], 151 | 152 | /** 153 | * An array of applied pre and post loaders. 154 | * 155 | * See: http://webpack.github.io/docs/configuration.html#module-preloaders-module-postloaders 156 | */ 157 | postLoaders: [ 158 | 159 | /** 160 | * Instruments JS files with Istanbul for subsequent code coverage reporting. 161 | * Instrument only testing sources. 162 | * 163 | * See: https://github.com/deepsweet/istanbul-instrumenter-loader 164 | */ 165 | { 166 | test: /\.(js|ts)$/, loader: 'istanbul-instrumenter-loader', 167 | include: helpers.root('src'), 168 | exclude: [ 169 | /\.(e2e|spec)\.ts$/, 170 | /node_modules/ 171 | ] 172 | } 173 | 174 | ] 175 | }, 176 | 177 | /** 178 | * Add additional plugins to the compiler. 179 | * 180 | * See: http://webpack.github.io/docs/configuration.html#plugins 181 | */ 182 | plugins: [ 183 | 184 | /** 185 | * Plugin: DefinePlugin 186 | * Description: Define free variables. 187 | * Useful for having development builds with debug logging or adding global constants. 188 | * 189 | * Environment helpers 190 | * 191 | * See: https://webpack.github.io/docs/list-of-plugins.html#defineplugin 192 | */ 193 | // NOTE: when adding more properties make sure you include them in custom-typings.d.ts 194 | new DefinePlugin({ 195 | 'ENV': JSON.stringify(ENV), 196 | 'HMR': false, 197 | 'process.env': { 198 | 'ENV': JSON.stringify(ENV), 199 | 'NODE_ENV': JSON.stringify(ENV), 200 | 'HMR': false, 201 | } 202 | }), 203 | 204 | 205 | ], 206 | 207 | /** 208 | * Static analysis linter for TypeScript advanced options configuration 209 | * Description: An extensible linter for the TypeScript language. 210 | * 211 | * See: https://github.com/wbuchwalter/tslint-loader 212 | */ 213 | tslint: { 214 | emitErrors: false, 215 | failOnHint: false, 216 | resourcePath: 'src' 217 | }, 218 | 219 | /** 220 | * Include polyfills or mocks for various node stuff 221 | * Description: Node configuration 222 | * 223 | * See: https://webpack.github.io/docs/configuration.html#node 224 | */ 225 | node: { 226 | global: 'window', 227 | process: false, 228 | crypto: 'empty', 229 | module: false, 230 | clearImmediate: false, 231 | setImmediate: false 232 | } 233 | 234 | }; 235 | } 236 | -------------------------------------------------------------------------------- /dist/webpack-assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "vendor": { 3 | "js": "vendor.bundle.js" 4 | }, 5 | "main": { 6 | "js": "main.bundle.js" 7 | }, 8 | "polyfills": { 9 | "js": "polyfills.bundle.js" 10 | } 11 | } -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | 5 | // Look in ./config for karma.conf.js 6 | module.exports = require('./config/karma.conf.js'); 7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular2", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [ 6 | "angular2", 7 | "webpack", 8 | "typescript" 9 | ], 10 | "author": "", 11 | "homepage": "", 12 | "license": "MIT", 13 | "scripts": { 14 | "build:dev": "webpack --config config/webpack.dev.js --progress --profile", 15 | "build:docker": "npm run build:prod && docker build -t angular2-webpack-start:latest .", 16 | "build:prod": "webpack --config config/webpack.prod.js --progress --profile --bail", 17 | "build": "npm run build:dev", 18 | "ci": "npm run lint && npm test && npm run e2e", 19 | "clean:dist": "npm run rimraf -- dist", 20 | "clean:install": "npm set progress=false && npm install", 21 | "clean:start": "npm start", 22 | "clean": "npm cache clean && npm run rimraf -- node_modules doc coverage dist", 23 | "docker": "docker", 24 | "docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/", 25 | "e2e:live": "npm run e2e -- --elementExplorer", 26 | "e2e": "npm run protractor", 27 | "github-deploy:dev": "webpack --config config/webpack.github-deploy.js --progress --profile --github-dev", 28 | "github-deploy:prod": "webpack --config config/webpack.github-deploy.js --progress --profile --github-prod", 29 | "github-deploy": "npm run github-deploy:dev", 30 | "lint": "npm run tslint \"src/**/*.ts\"", 31 | "postversion": "git push && git push --tags", 32 | "prebuild:dev": "npm run clean:dist", 33 | "prebuild:prod": "npm run clean:dist", 34 | "preclean:install": "npm run clean", 35 | "preclean:start": "npm run clean", 36 | "pree2e": "npm run webdriver:update -- --standalone", 37 | "preversion": "npm test", 38 | "protractor": "protractor", 39 | "rimraf": "rimraf", 40 | "server:dev:hmr": "npm run server:dev -- --inline --hot", 41 | "server:dev": "webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/", 42 | "server:prod": "http-server dist --cors", 43 | "server": "npm run server:dev", 44 | "start:hmr": "npm run server:dev:hmr", 45 | "start": "npm run server:dev", 46 | "test": "karma start", 47 | "tslint": "tslint", 48 | "typedoc": "typedoc", 49 | "version": "npm run build", 50 | "watch:dev:hmr": "npm run watch:dev -- --hot", 51 | "watch:dev": "npm run build:dev -- --watch", 52 | "watch:prod": "npm run build:prod -- --watch", 53 | "watch:test": "npm run test -- --auto-watch --no-single-run", 54 | "watch": "npm run watch:dev", 55 | "webdriver-manager": "webdriver-manager", 56 | "webdriver:start": "npm run webdriver-manager start", 57 | "webdriver:update": "npm run webdriver-manager update", 58 | "webpack-dev-server": "webpack-dev-server", 59 | "webpack": "webpack" 60 | }, 61 | "dependencies": { 62 | "@angular/common": "2.0.0", 63 | "@angular/compiler": "2.0.0", 64 | "@angular/core": "2.0.0", 65 | "@angular/forms": "^2.0.0", 66 | "@angular/http": "2.0.0", 67 | "@angular/platform-browser": "2.0.0", 68 | "@angular/platform-browser-dynamic": "2.0.0", 69 | "@angular/platform-server": "2.0.0", 70 | "@angular/router": "3.0.0", 71 | "@angularclass/conventions-loader": "^1.0.2", 72 | "@angularclass/hmr": "~1.2.0", 73 | "@angularclass/hmr-loader": "~3.0.2", 74 | "@angularclass/request-idle-callback": "^1.0.7", 75 | "@angularclass/webpack-toolkit": "^1.3.3", 76 | "assets-webpack-plugin": "^3.4.0", 77 | "core-js": "^2.4.1", 78 | "http-server": "^0.9.0", 79 | "ie-shim": "^0.1.0", 80 | "rxjs": "5.0.0-beta.12", 81 | "zone.js": "~0.6.17", 82 | "bootstrap": "^3.3.7", 83 | "jquery": "^2.0.0" 84 | }, 85 | "devDependencies": { 86 | "@types/jquery": "^1.10.31", 87 | "@types/core-js": "^0.9.28", 88 | "@types/hammerjs": "^2.0.28", 89 | "@types/jasmine": "^2.2.29", 90 | "@types/node": "^6.0.38", 91 | "@types/protractor": "^1.5.16", 92 | "@types/selenium-webdriver": "^2.44.26", 93 | "@types/source-map": "^0.1.26", 94 | "@types/uglify-js": "^2.0.27", 95 | "@types/webpack": "^1.12.29", 96 | "angular2-template-loader": "^0.5.0", 97 | "awesome-typescript-loader": "^2.2.1", 98 | "codelyzer": "~0.0.28", 99 | "copy-webpack-plugin": "^3.0.1", 100 | "css-loader": "^0.25.0", 101 | "exports-loader": "^0.6.3", 102 | "expose-loader": "^0.7.1", 103 | "file-loader": "^0.9.0", 104 | "gh-pages": "^0.11.0", 105 | "html-webpack-plugin": "^2.21.0", 106 | "imports-loader": "^0.6.5", 107 | "istanbul-instrumenter-loader": "^0.2.0", 108 | "json-loader": "^0.5.4", 109 | "karma": "^1.2.0", 110 | "karma-chrome-launcher": "^2.0.0 ", 111 | "karma-coverage": "^1.1.1", 112 | "karma-jasmine": "^1.0.2", 113 | "karma-mocha-reporter": "^2.0.0", 114 | "karma-sourcemap-loader": "^0.3.7", 115 | "karma-webpack": "1.8.0", 116 | "parse5": "^1.3.2", 117 | "protractor": "^3.2.2", 118 | "raw-loader": "0.5.1", 119 | "remap-istanbul": "^0.6.3", 120 | "rimraf": "^2.5.2", 121 | "source-map-loader": "^0.1.5", 122 | "string-replace-loader": "github:gdi2290/string-replace-loader", 123 | "style-loader": "^0.13.1", 124 | "to-string-loader": "^1.1.4", 125 | "ts-helpers": "1.1.1", 126 | "ts-node": "^1.3.0", 127 | "tslint": "3.15.1", 128 | "tslint-loader": "^2.1.3", 129 | "typedoc": "^0.4.5", 130 | "typescript": "2.0.0", 131 | "url-loader": "^0.5.7", 132 | "webpack": "2.1.0-beta.21", 133 | "webpack-dev-middleware": "^1.6.1", 134 | "webpack-dev-server": "^2.1.0-beta.2", 135 | "webpack-md5-hash": "^0.0.5", 136 | "webpack-merge": "^0.14.1" 137 | }, 138 | "engines": { 139 | "node": ">= 4.2.1", 140 | "npm": ">= 3" 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /protractor.conf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | 5 | // look in ./config for protractor.conf.js 6 | exports.config = require('./config/protractor.conf.js').config; 7 | -------------------------------------------------------------------------------- /src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/.DS_Store -------------------------------------------------------------------------------- /src/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/.idea/jsLibraryMappings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 44 | 45 | 46 | 47 | 48 | 49 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | $USER_HOME$/.subversion 68 | 69 | 70 | 71 | 72 | 73 | 74 | 79 | 80 | 81 | 82 | 83 | 84 | 1.8 85 | 86 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/.idea/src.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/app/.DS_Store -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Angular 2 decorators and services 3 | */ 4 | import { Component, ViewEncapsulation } from '@angular/core'; 5 | 6 | import { AppState } from './app.service'; 7 | 8 | /* 9 | * App Component 10 | * Top Level Component 11 | */ 12 | @Component({ 13 | selector: 'app', 14 | encapsulation: ViewEncapsulation.None, 15 | styleUrls: [ 16 | './app.style.css' 17 | ], 18 | template: ` 19 | 20 | ` 21 | }) 22 | export class App { 23 | angularclassLogo = 'assets/img/angularclass-avatar.png'; 24 | name = 'Angular 2 Webpack Starter'; 25 | url = 'https://twitter.com/AngularClass'; 26 | 27 | constructor( 28 | public appState: AppState) { 29 | 30 | } 31 | 32 | ngOnInit() { 33 | console.log('Initial App State', this.appState.state); 34 | } 35 | 36 | } 37 | 38 | /* 39 | * Please review the https://github.com/AngularClass/angular2-examples/ repo for 40 | * more angular app examples that you may copy/paste 41 | * (The examples may not be updated as quickly. Please open an issue on github for us to update it) 42 | * For help or questions please contact us at @AngularClass on twitter 43 | * or our chat on Slack at https://AngularClass.com/slack-join 44 | */ 45 | -------------------------------------------------------------------------------- /src/app/app.e2e.ts: -------------------------------------------------------------------------------- 1 | describe('App', () => { 2 | 3 | beforeEach(() => { 4 | browser.get('/'); 5 | }); 6 | 7 | 8 | it('should have a title', () => { 9 | let subject = browser.getTitle(); 10 | let result = 'Angular2 Webpack Starter by @gdi2290 from @AngularClass'; 11 | expect(subject).toEqual(result); 12 | }); 13 | 14 | it('should have header', () => { 15 | let subject = element(by.css('h1')).isPresent(); 16 | let result = true; 17 | expect(subject).toEqual(result); 18 | }); 19 | 20 | it('should have ', () => { 21 | let subject = element(by.css('app home')).isPresent(); 22 | let result = true; 23 | expect(subject).toEqual(result); 24 | }); 25 | 26 | it('should have buttons', () => { 27 | let subject = element(by.css('button')).getText(); 28 | let result = 'Submit Value'; 29 | expect(subject).toEqual(result); 30 | }); 31 | 32 | }); 33 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, ApplicationRef } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { HttpModule } from '@angular/http'; 5 | import { RouterModule } from '@angular/router'; 6 | import { removeNgStyles, createNewHosts, createInputTransfer } from '@angularclass/hmr'; 7 | 8 | /* 9 | * Platform and Environment providers/directives/pipes 10 | */ 11 | import { ENV_PROVIDERS } from './environment'; 12 | import { ROUTES } from './app.routes'; 13 | 14 | import { AppState, InteralStateType } from './app.service'; 15 | // app 是我们最顶层的组件 16 | import { App } from './app.component'; 17 | 18 | // 导入组件 19 | import {Loading} from './components/loading/loading.component'; 20 | import {Navbar} from './components/navbar/navbar.component'; 21 | import {Sidebar} from './components/sidebar/sidebar.component'; 22 | import {MyToggleMinNavDirecive} from './components/navbar/toggleMinNav.directive'; 23 | import {MyCollapseNavDirective} from './components/sidebar/collapseNav.directive'; 24 | import {MySlimScrollDirective} from './components/sidebar/slimScroll.directive'; 25 | import { APP_RESOLVER_PROVIDERS } from './app.resolver'; 26 | import {DashboardComponent} from './containers/dashboard/dashboard.component'; 27 | import { LoginComponent } from './containers/login/login.component'; 28 | import {About} from './containers/about'; 29 | import { NoContent } from './containers/no-content'; 30 | 31 | // Application wide providers 32 | const APP_PROVIDERS = [ 33 | ...APP_RESOLVER_PROVIDERS, 34 | AppState 35 | ]; 36 | 37 | type StoreType = { 38 | state: InteralStateType, 39 | restoreInputValues: () => void, 40 | disposeOldHosts: () => void 41 | }; 42 | 43 | /** 44 | * `AppModule` is the main entry point into Angular2's bootstraping process 45 | */ 46 | @NgModule({ 47 | bootstrap: [ App ], 48 | declarations: [ 49 | App, 50 | Loading, 51 | Navbar, 52 | Sidebar, 53 | MyToggleMinNavDirecive, 54 | MyCollapseNavDirective, 55 | MySlimScrollDirective, 56 | LoginComponent, 57 | DashboardComponent, 58 | About, 59 | NoContent 60 | ], 61 | imports: [ // import Angular's modules 62 | BrowserModule, 63 | FormsModule, 64 | HttpModule, 65 | RouterModule.forRoot(ROUTES, { useHash: true }) 66 | ], 67 | providers: [ // expose our Services and Providers into Angular's dependency injection 68 | ENV_PROVIDERS, 69 | APP_PROVIDERS 70 | ] 71 | }) 72 | export class AppModule { 73 | constructor(public appRef: ApplicationRef, public appState: AppState) {} 74 | 75 | hmrOnInit(store: StoreType) { 76 | if (!store || !store.state) return; 77 | console.log('HMR store', JSON.stringify(store, null, 2)); 78 | // set state 79 | this.appState._state = store.state; 80 | // set input values 81 | if ('restoreInputValues' in store) { 82 | let restoreInputValues = store.restoreInputValues; 83 | setTimeout(restoreInputValues); 84 | } 85 | 86 | this.appRef.tick(); 87 | delete store.state; 88 | delete store.restoreInputValues; 89 | } 90 | 91 | hmrOnDestroy(store: StoreType) { 92 | const cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement); 93 | // save state 94 | const state = this.appState._state; 95 | store.state = state; 96 | // recreate root elements 97 | store.disposeOldHosts = createNewHosts(cmpLocation); 98 | // save input values 99 | store.restoreInputValues = createInputTransfer(); 100 | // remove styles 101 | removeNgStyles(); 102 | } 103 | 104 | hmrAfterDestroy(store: StoreType) { 105 | // display new elements 106 | store.disposeOldHosts(); 107 | delete store.disposeOldHosts; 108 | } 109 | 110 | } 111 | 112 | -------------------------------------------------------------------------------- /src/app/app.resolver.ts: -------------------------------------------------------------------------------- 1 | import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; 2 | import { Injectable } from '@angular/core'; 3 | import { Observable } from 'rxjs/Observable'; 4 | import 'rxjs/add/observable/of'; 5 | 6 | @Injectable() 7 | export class DataResolver implements Resolve { 8 | constructor() { 9 | 10 | } 11 | resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { 12 | return Observable.of({ res: 'I am data'}); 13 | } 14 | } 15 | 16 | // an array of services to resolve routes with data 17 | export const APP_RESOLVER_PROVIDERS = [ 18 | DataResolver 19 | ]; 20 | -------------------------------------------------------------------------------- /src/app/app.routes.ts: -------------------------------------------------------------------------------- 1 | import {Routes, RouterModule} from '@angular/router'; 2 | import {NoContent} from './containers/no-content'; 3 | import {LoginComponent} from './containers/login/login.component'; 4 | import {DashboardComponent} from './containers/dashboard/dashboard.component'; 5 | import {About} from './containers/about'; 6 | import {DataResolver} from './app.resolver'; 7 | 8 | 9 | export const ROUTES:Routes = [ 10 | {path: '', component: LoginComponent}, 11 | {path: 'login', component: LoginComponent}, 12 | { 13 | path: 'dashboard', component: DashboardComponent, 14 | children: [ 15 | {path: '', loadChildren: () => System.import('./containers/home')}, 16 | {path: 'home', loadChildren: () => System.import('./containers/home')}, 17 | {path: 'detail', loadChildren: () => System.import('./containers/+detail')}, 18 | {path: 'about', component: About}, 19 | ] 20 | }, 21 | {path: '**', component: NoContent}, 22 | ]; 23 | -------------------------------------------------------------------------------- /src/app/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | export type InteralStateType = { 4 | [key: string]: any 5 | }; 6 | 7 | @Injectable() 8 | export class AppState { 9 | _state: InteralStateType = { }; 10 | 11 | constructor() { 12 | 13 | } 14 | 15 | // 总是返回一个最新的state 16 | get state() { 17 | return this._state = this._clone(this._state); 18 | } 19 | // state不允许变化, 改变state直接抛出异常 20 | set state(value) { 21 | throw new Error('do not mutate the `.state` directly'); 22 | } 23 | 24 | 25 | get(prop?: any) { 26 | // 永远使用克隆的对象 27 | const state = this.state; 28 | return state.hasOwnProperty(prop) ? state[prop] : null; 29 | } 30 | 31 | set(prop: string, value: any) { 32 | // 改变state的内部属性 33 | return this._state[prop] = value; 34 | } 35 | 36 | 37 | private _clone(object: InteralStateType) { 38 | // 简单的克隆对象 39 | return JSON.parse(JSON.stringify( object )); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/app/app.spec.ts: -------------------------------------------------------------------------------- 1 | import { 2 | inject, 3 | TestBed 4 | } from '@angular/core/testing'; 5 | 6 | // Load the implementations that should be tested 7 | import { App } from './app.component'; 8 | import { AppState } from './app.service'; 9 | 10 | describe('App', () => { 11 | // provide our implementations or mocks to the dependency injector 12 | beforeEach(() => TestBed.configureTestingModule({ 13 | providers: [ 14 | AppState, 15 | App 16 | ]})); 17 | 18 | it('should have a url', inject([ App ], (app: App) => { 19 | expect(app.url).toEqual('https://twitter.com/AngularClass'); 20 | })); 21 | 22 | }); 23 | -------------------------------------------------------------------------------- /src/app/app.style.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | height: 100%; 3 | font-family: '微软雅黑', Arial, Helvetica, sans-serif 4 | } 5 | .active span { 6 | color: #31c0be !important; 7 | } 8 | 9 | .app-main { 10 | padding-top: 47px; 11 | margin-left: 180px; 12 | padding-left: 14px; 13 | padding-right: 14px; 14 | transform: translate3d(0, 0, 0); 15 | background-color: #f5f5f5; 16 | } 17 | 18 | .nav-min .app-main { 19 | padding-top: 47px; 20 | margin-left: 60px; 21 | padding-left: 14px; 22 | padding-right: 14px; 23 | transform: translate3d(0, 0, 0); 24 | background-color: #f5f5f5; 25 | } 26 | 27 | .is-active { 28 | color: #1fc8db!important; 29 | } 30 | #nav-container { 31 | z-index: 11; 32 | position: fixed; 33 | top: 50px; 34 | bottom: 0; 35 | left: -180px; 36 | width: 180px; 37 | padding: 0; 38 | background-color: #242633; 39 | -webkit-overflow-scrolling: touch; 40 | -webkit-overflow-scrolling: -blackberry-touch; 41 | } 42 | @media (min-width: 768px) { 43 | #nav-container { 44 | left: 0 45 | } 46 | } 47 | 48 | #nav-container ul { 49 | padding-left: 0; 50 | list-style: none 51 | } 52 | 53 | #nav-wrapper { 54 | -webkit-overflow-scrolling: touch; 55 | -webkit-overflow-scrolling: -blackberry-touch; 56 | width: 100%; 57 | height: 100% 58 | } 59 | 60 | #nav { 61 | margin: 0; 62 | padding: 0; 63 | -webkit-overflow-scrolling: touch; 64 | -webkit-overflow-scrolling: -blackberry-touch 65 | } 66 | 67 | #nav > li > a > .nav-icon, #nav > li > a > i { 68 | display: inline-block; 69 | margin-right: 10px; 70 | width: 20px; 71 | line-height: 1; 72 | text-align: center; 73 | font-size: 16px; 74 | -webkit-transition: all .2s ease-in-out; 75 | -moz-transition: all .2s ease-in-out; 76 | -o-transition: all .2s ease-in-out; 77 | transition: all .2s ease-in-out 78 | } 79 | 80 | #nav { 81 | color: #767676 82 | } 83 | 84 | #nav a { 85 | font-size: 13px; 86 | color: #999; 87 | -webkit-transition: all .2s ease-in-out; 88 | -moz-transition: all .2s ease-in-out; 89 | -o-transition: all .2s ease-in-out; 90 | transition: all .2s ease-in-out 91 | } 92 | 93 | #nav a:hover { 94 | text-decoration: none 95 | } 96 | 97 | #nav > li { 98 | position: relative; 99 | margin: 0; 100 | text-align: left; 101 | font-weight: 700; 102 | -webkit-transition: all .2s ease-in-out; 103 | -moz-transition: all .2s ease-in-out; 104 | -o-transition: all .2s ease-in-out; 105 | transition: all .2s ease-in-out 106 | } 107 | 108 | #nav > li.open > a, #nav > li:hover > a { 109 | background-color: #191b24; 110 | color: #fafafa 111 | } 112 | 113 | #nav > li.open > .fa, #nav > li:hover > .fa { 114 | color: #fafafa 115 | } 116 | 117 | #nav > li.active > a { 118 | background-color: #31c0be; 119 | color: #fafafa 120 | } 121 | 122 | #nav > li.active > .fa { 123 | color: #fafafa 124 | } 125 | 126 | #nav > li:first-child > a { 127 | border-top: 0 128 | } 129 | 130 | #nav > li > a { 131 | position: relative; 132 | display: block; 133 | padding: 15px; 134 | -webkit-transition: all .2s ease-in-out; 135 | -moz-transition: all .2s ease-in-out; 136 | -o-transition: all .2s ease-in-out; 137 | transition: all .2s ease-in-out 138 | } 139 | 140 | #nav > li > a > .badge { 141 | position: absolute; 142 | top: 16px; 143 | right: 5px 144 | } 145 | 146 | #nav > li > .icon-has-ul { 147 | position: absolute; 148 | top: 18px; 149 | right: 15px 150 | } 151 | 152 | #nav ul { 153 | background-color: #242633; 154 | display: none 155 | } 156 | 157 | #nav ul a { 158 | font-size: 13px 159 | } 160 | 161 | #nav ul li { 162 | position: relative; 163 | padding: 0 164 | } 165 | 166 | #nav ul li.active a, #nav ul li:hover a { 167 | color: #31c0be 168 | } 169 | 170 | #nav ul li:last-child > a { 171 | border-bottom: 0 172 | } 173 | 174 | #nav ul li > a { 175 | position: relative; 176 | display: block; 177 | padding: 13px 0 13px 25px; 178 | -webkit-transition: all .2s ease-in-out; 179 | -moz-transition: all .2s ease-in-out; 180 | -o-transition: all .2s ease-in-out; 181 | transition: all .2s ease-in-out 182 | } 183 | 184 | #nav ul li > a:first-child { 185 | border-top: none 186 | } 187 | 188 | #nav ul li > a i.fa-caret-right { 189 | margin-right: 25px 190 | } 191 | 192 | #nav ul li > a > .badge { 193 | position: absolute; 194 | right: 5px; 195 | top: 12px 196 | } 197 | 198 | #nav-container { 199 | left: 0 200 | } 201 | 202 | @media (min-width: 768px) { 203 | .nav-min #nav-container { 204 | width: 60px 205 | } 206 | 207 | .nav-min #content { 208 | left: 60px 209 | } 210 | 211 | .nav-min .slimScrollDiv { 212 | overflow: visible !important; 213 | height: auto !important 214 | } 215 | 216 | .nav-min .slimScrollDiv .slimScrollBar, .nav-min .slimScrollDiv .slimScrollRail { 217 | display: none !important 218 | } 219 | 220 | .nav-min #nav, .nav-min #nav-wrapper { 221 | overflow: visible !important 222 | } 223 | 224 | .nav-min #nav > li > a { 225 | padding: 15px; 226 | text-align: center 227 | } 228 | 229 | .nav-min #nav > li > a > i { 230 | margin: 0; 231 | font-size: 20px 232 | } 233 | 234 | .nav-min #nav > li .icon-has-ul, .nav-min #nav > li > a > span { 235 | display: none 236 | } 237 | 238 | .nav-min #nav > li > ul { 239 | position: absolute; 240 | left: 100%; 241 | top: 0; 242 | width: 220px; 243 | -moz-border-radius-topright: 0; 244 | -webkit-border-top-right-radius: 0; 245 | border-top-right-radius: 0; 246 | -moz-border-radius-bottomright: 0; 247 | -webkit-border-bottom-right-radius: 0; 248 | border-bottom-right-radius: 0; 249 | -webkit-box-shadow: 1px 0 3px rgba(0, 0, 0, .2); 250 | -moz-box-shadow: 1px 0 3px rgba(0, 0, 0, .2); 251 | box-shadow: 1px 0 3px rgba(0, 0, 0, .2) 252 | } 253 | 254 | .nav-min #nav > li.open > ul, .nav-min #nav > li:hover > ul { 255 | display: block !important 256 | } 257 | } 258 | 259 | .card-container { 260 | background-color: #fff; 261 | } 262 | 263 | 264 | -------------------------------------------------------------------------------- /src/app/components/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/app/components/.DS_Store -------------------------------------------------------------------------------- /src/app/components/loading/loading.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chengfei on 16/8/26. 3 | * loading 4 | */ 5 | import {Component, OnInit, Input, SimpleChange} from '@angular/core'; 6 | 7 | @Component({ 8 | selector: 'loading', 9 | template: ` 10 |
11 | Loading… 12 |
13 | `, 14 | styleUrls: ['./loading.style.css'] 15 | }) 16 | export class Loading implements OnInit { 17 | @Input() showLoading:boolean; 18 | 19 | constructor() { 20 | } 21 | 22 | ngOnInit() { 23 | } 24 | ngOnChanges(changes:{[showLoading:string]:SimpleChange}) { 25 | console.log('检测状态变化loading' + JSON.stringify(changes)); 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/app/components/loading/loading.style.css: -------------------------------------------------------------------------------- 1 | .loading { 2 | background: rgba(255, 255, 255, 0.5) none repeat scroll 0 0; 3 | border-radius: 15px; 4 | display: block; 5 | height: 100%; 6 | margin-bottom: 0; 7 | margin-left: auto; 8 | margin-right: auto; 9 | position: fixed; 10 | text-align: center; 11 | top: 0; 12 | vertical-align: middle; 13 | width: 100%; 14 | z-index: 100; 15 | left: 0; 16 | } 17 | 18 | @keyframes dots-loader { 19 | 0% { 20 | box-shadow: -14px -14px 0 7px #f86, 14px -14px 0 7px #fc6, 14px 14px 0 7px #6d7, -14px 14px 0 7px #4ae; 21 | } 22 | 8.33% { 23 | box-shadow: 14px -14px 0 7px #f86, 14px -14px 0 7px #fc6, 14px 14px 0 7px #6d7, -14px 14px 0 7px #4ae; 24 | } 25 | 16.67% { 26 | box-shadow: 14px 14px 0 7px #f86, 14px 14px 0 7px #fc6, 14px 14px 0 7px #6d7, -14px 14px 0 7px #4ae; 27 | } 28 | 25% { 29 | box-shadow: -14px 14px 0 7px #f86, -14px 14px 0 7px #fc6, -14px 14px 0 7px #6d7, -14px 14px 0 7px #4ae; 30 | } 31 | 33.33% { 32 | box-shadow: -14px -14px 0 7px #f86, -14px 14px 0 7px #fc6, -14px -14px 0 7px #6d7, -14px -14px 0 7px #4ae; 33 | } 34 | 41.67% { 35 | box-shadow: 14px -14px 0 7px #f86, -14px 14px 0 7px #fc6, -14px -14px 0 7px #6d7, 14px -14px 0 7px #4ae; 36 | } 37 | 50% { 38 | box-shadow: 14px 14px 0 7px #f86, -14px 14px 0 7px #fc6, -14px -14px 0 7px #6d7, 14px -14px 0 7px #4ae; 39 | } 40 | 58.33% { 41 | box-shadow: -14px 14px 0 7px #f86, -14px 14px 0 7px #fc6, -14px -14px 0 7px #6d7, 14px -14px 0 7px #4ae; 42 | } 43 | 66.67% { 44 | box-shadow: -14px -14px 0 7px #f86, -14px -14px 0 7px #fc6, -14px -14px 0 7px #6d7, 14px -14px 0 7px #4ae; 45 | } 46 | 75% { 47 | box-shadow: 14px -14px 0 7px #f86, 14px -14px 0 7px #fc6, 14px -14px 0 7px #6d7, 14px -14px 0 7px #4ae; 48 | } 49 | 83.33% { 50 | box-shadow: 14px 14px 0 7px #f86, 14px -14px 0 7px #fc6, 14px 14px 0 7px #6d7, 14px 14px 0 7px #4ae; 51 | } 52 | 91.67% { 53 | box-shadow: -14px 14px 0 7px #f86, 14px -14px 0 7px #fc6, 14px 14px 0 7px #6d7, -14px 14px 0 7px #4ae; 54 | } 55 | 100% { 56 | box-shadow: -14px -14px 0 7px #f86, 14px -14px 0 7px #fc6, 14px 14px 0 7px #6d7, -14px 14px 0 7px #4ae; 57 | } 58 | } 59 | 60 | .dots-loader:not(:required) { 61 | animation: 5s ease-in-out 0s normal none infinite running dots-loader; 62 | background: transparent none repeat scroll 0 0; 63 | border-radius: 100%; 64 | box-shadow: -14px -14px 0 7px #f86, 14px -14px 0 7px #fc6, 14px 14px 0 7px #6d7, -14px 14px 0 7px #4ae; 65 | display: inline-block; 66 | height: 7px; 67 | margin-top: 260px; 68 | overflow: hidden; 69 | position: relative; 70 | text-indent: -9999px; 71 | transform-origin: 50% 50% 0; 72 | width: 7px; 73 | left: 0; 74 | } -------------------------------------------------------------------------------- /src/app/components/navbar/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/app/components/navbar/.DS_Store -------------------------------------------------------------------------------- /src/app/components/navbar/navbar.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 顶部 3 | * Created by chengfei on 16/8/25. 4 | */ 5 | import {Component, OnInit} from '@angular/core'; 6 | import { RouterLinkActive} from '@angular/router'; 7 | 8 | @Component({ 9 | selector: 'navbar', 10 | templateUrl: './navbar.template.html', 11 | styleUrls: ['./navbar.style.css'] 12 | }) 13 | export class Navbar implements OnInit { 14 | constructor() { 15 | 16 | } 17 | 18 | ngOnInit() { 19 | } 20 | } -------------------------------------------------------------------------------- /src/app/components/navbar/navbar.style.css: -------------------------------------------------------------------------------- 1 | .navbar { 2 | position: fixed; 3 | z-index: 1; 4 | background-color: #fff; 5 | border: 1px solid #e9e9e9; 6 | width: 100%; 7 | height: 50px; 8 | } 9 | .top-header{ 10 | border-right: 1px solid #e9e9e9; 11 | width: 180px; 12 | height: 50px; 13 | text-align: center; 14 | line-height: 50px; 15 | font-size: 24px; 16 | } 17 | .fl{ 18 | float: left; 19 | } 20 | .toggle-min{ 21 | text-align: center; 22 | } 23 | .toggle-min i{ 24 | font-size: 40px; 25 | } 26 | .p5{ 27 | padding: 5px; 28 | } -------------------------------------------------------------------------------- /src/app/components/navbar/navbar.template.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 15 |
16 |
17 |
-------------------------------------------------------------------------------- /src/app/components/navbar/toggleMinNav.directive.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 菜单蛋伸缩 3 | */ 4 | import { 5 | Directive, 6 | ElementRef, 7 | Renderer 8 | } from '@angular/core'; 9 | import * as $ from 'jquery'; 10 | @Directive({ 11 | selector: '[myToggleMinNav]' 12 | }) 13 | export class MyToggleMinNavDirecive { 14 | constructor(public element:ElementRef) { 15 | } 16 | 17 | ngOnInit() { 18 | var $nav, app, ele; 19 | ele = $(this.element.nativeElement); 20 | return app = $("#app"), 21 | $nav = $("#nav-container"), 22 | ele.on("click", 23 | function (e) { 24 | app.hasClass("nav-min") ? app.removeClass("nav-min") : (app.addClass("nav-min")); 25 | $nav.find('.open').removeClass('open').find("ul").slideUp(); 26 | e.preventDefault(); 27 | }) 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/app/components/sidebar/collapseNav.directive.ts: -------------------------------------------------------------------------------- 1 | import {Directive, ElementRef} from '@angular/core'; 2 | import * as $ from 'jquery'; 3 | @Directive({ 4 | selector: '[myCollapseNav]' // 指令推荐使用小驼峰命名,前面加自定义名词 5 | }) 6 | export class MyCollapseNavDirective { 7 | constructor(public element:ElementRef) { 8 | } 9 | 10 | ngOnInit() { 11 | var $a, $aRest, $lists, $listsRest, app, ele; 12 | ele = $(this.element.nativeElement); 13 | return $lists = ele.find("ul").parent("li"), 14 | $a = $lists.children("a"), 15 | $listsRest = ele.children("li").not($lists), 16 | $aRest = $listsRest.children("a"), 17 | app = $("#app"), 18 | $a.on("click", 19 | function (event) { 20 | var $parent, $this; 21 | return app.hasClass("nav-min") ? !1 : ($this = $(this), $parent = $this.parent("li"), $lists.not($parent).removeClass("open").find("ul").slideUp(), $parent.toggleClass("open").find("ul").slideToggle(), event.preventDefault()) 22 | }), 23 | $aRest.on("click", 24 | function () { 25 | return $lists.removeClass("open").find("ul").slideUp(); 26 | }) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/app/components/sidebar/sidebar.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 侧边栏 3 | * Created by chengfei on 16/8/25. 4 | */ 5 | import {Component, OnInit} from '@angular/core'; 6 | import {RouterLinkActive} from '@angular/router'; 7 | 8 | @Component({ 9 | selector: 'sidebar', 10 | templateUrl: './sidebar.template.html', 11 | styleUrls: ['./sidebar.style.css'] 12 | }) 13 | export class Sidebar implements OnInit { 14 | constructor() { 15 | 16 | } 17 | 18 | ngOnInit() { 19 | 20 | } 21 | } -------------------------------------------------------------------------------- /src/app/components/sidebar/sidebar.style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/app/components/sidebar/sidebar.style.css -------------------------------------------------------------------------------- /src/app/components/sidebar/sidebar.template.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/sidebar/slimScroll.directive.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 菜单栏自适应滚动 3 | */ 4 | import { 5 | Directive, 6 | ElementRef, 7 | Renderer 8 | } from '@angular/core'; 9 | import * as $ from 'jquery'; 10 | @Directive({ 11 | selector: '[mySlimScroll]' 12 | }) 13 | export class MySlimScrollDirective { 14 | constructor(public element:ElementRef) { 15 | } 16 | 17 | ngOnInit() { 18 | var ele; 19 | ele = $(this.element.nativeElement); 20 | return ele.slimScroll({ 21 | height: ele.attr('scrollHeight') || "100%" 22 | }) 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /src/app/containers/+detail/detail.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, SimpleChange } from '@angular/core'; 2 | import {AppState} from '../../app.service'; 3 | @Component({ 4 | selector: 'detail', 5 | template: ` 6 |
7 |

没有详情

8 |
9 | ` 10 | }) 11 | export class Detail { 12 | 13 | constructor(public appState : AppState ) { 14 | 15 | } 16 | 17 | /** 18 | * 当 Angular 初始化完数据绑定的输入属性后,用来初始化指令或组件。 19 | */ 20 | ngOnInit() { 21 | console.log('Initial App State', this.appState.state); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/app/containers/+detail/index.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { FormsModule } from '@angular/forms'; 3 | import { NgModule } from '@angular/core'; 4 | import { RouterModule } from '@angular/router'; 5 | 6 | import { Detail } from './detail.component'; 7 | 8 | console.log('`Detail` bundle loaded asynchronously'); 9 | export const routes = [ 10 | { path: '', component: Detail, pathMatch: 'full' } 11 | ]; 12 | 13 | @NgModule({ 14 | declarations: [ 15 | Detail 16 | ], 17 | imports: [ 18 | CommonModule, 19 | FormsModule, 20 | RouterModule.forChild(routes), 21 | ] 22 | }) 23 | export default class AboutModule { 24 | static routes = routes; 25 | } 26 | -------------------------------------------------------------------------------- /src/app/containers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/app/containers/.DS_Store -------------------------------------------------------------------------------- /src/app/containers/about/about.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {ActivatedRoute} from '@angular/router'; 3 | 4 | @Component({ 5 | selector: 'about', 6 | styles: [` 7 | `], 8 | template: ` 9 |

关于我就不说了,正在前往漓江塔...

10 |
11 |

12 | please post your star 13 |

14 |
15 | ` 16 | }) 17 | export class About { 18 | localState; 19 | 20 | constructor(public route:ActivatedRoute) { 21 | 22 | } 23 | 24 | ngOnInit() { 25 | this.route 26 | .data 27 | .subscribe((data:any) => { 28 | // your resolved data from route 29 | this.localState = data.yourData; 30 | }); 31 | 32 | console.log('hello `About` component'); 33 | // static data that is bundled 34 | // var mockData = require('assets/mock-data/mock-data.json'); 35 | // console.log('mockData', mockData); 36 | // if you're working with mock data you can also use http.get('assets/mock-data/mock-data.json') 37 | this.asyncDataWithWebpack(); 38 | } 39 | 40 | asyncDataWithWebpack() { 41 | // you can also async load mock data with 'es6-promise-loader' 42 | // you would do this if you don't want the mock-data bundled 43 | // remember that 'es6-promise-loader' is a promise 44 | setTimeout(() => { 45 | System.import('../../../assets/mock-data/mock-data.json') 46 | .then(json => { 47 | console.log('async mockData', json); 48 | this.localState = json; 49 | }); 50 | 51 | }); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/app/containers/about/about.spec.ts: -------------------------------------------------------------------------------- 1 | import { ActivatedRoute, Data } from '@angular/router'; 2 | import { Component } from '@angular/core'; 3 | import { inject, TestBed } from '@angular/core/testing'; 4 | 5 | // Load the implementations that should be tested 6 | import { About } from './about.component'; 7 | 8 | describe('About', () => { 9 | // provide our implementations or mocks to the dependency injector 10 | beforeEach(() => TestBed.configureTestingModule({ 11 | providers: [ 12 | // provide a better mock 13 | { 14 | provide: ActivatedRoute, 15 | useValue: { 16 | data: { 17 | subscribe: (fn: (value: Data) => void) => fn({ 18 | yourData: 'yolo' 19 | }) 20 | } 21 | } 22 | }, 23 | About 24 | ] 25 | })); 26 | 27 | it('should log ngOnInit', inject([About], (about: About) => { 28 | spyOn(console, 'log'); 29 | expect(console.log).not.toHaveBeenCalled(); 30 | 31 | about.ngOnInit(); 32 | expect(console.log).toHaveBeenCalled(); 33 | })); 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /src/app/containers/about/index.ts: -------------------------------------------------------------------------------- 1 | export * from './about.component'; 2 | -------------------------------------------------------------------------------- /src/app/containers/dashboard/dashboard.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chengfei on 16/9/19. 3 | */ 4 | import {Component, OnInit, SimpleChange} from '@angular/core'; 5 | import {AppState} from '../../app.service'; 6 | @Component({ 7 | selector: 'dashboard', 8 | template: ` 9 | 10 | 11 | 12 |
13 | 14 |
` 15 | }) 16 | export class DashboardComponent implements OnInit { 17 | showLoading:boolean = false; 18 | 19 | constructor(public appState:AppState) { 20 | 21 | } 22 | 23 | /** 24 | * 当 Angular 初始化完数据绑定的输入属性后,用来初始化指令或组件。 25 | */ 26 | ngOnInit() { 27 | console.log('Initial App State', this.appState.state); 28 | } 29 | 30 | /** 31 | * 用来监测所有变化 ( 无论是 Angular 本身能检测的还是无法检测的 ) ,所以这边能更新loading状态 32 | */ 33 | ngDoCheck() { 34 | this.showLoading = this.appState.get('loading') || false; 35 | } 36 | 37 | /** 38 | * 当 Angular 设置了一个被绑定的输入属性后触发。该回调方法会收到一个包含当前值和 39 | * 原值的 changes 对象。(类似angular1中watcher,只能监测输入属性) 40 | */ 41 | ngOnChanges(changes:{[show:string]:SimpleChange}) { 42 | console.log('检测状态变化2' + JSON.stringify(changes)); 43 | } 44 | 45 | /** 46 | * 在 Angular 销毁指令或组件之前做一些清理工作,比如退订可观察对象和移除事件处理器,以免导致内存泄露。 47 | */ 48 | ngOnDestroy() { 49 | 50 | } 51 | } -------------------------------------------------------------------------------- /src/app/containers/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {AppState} from '../../app.service'; 3 | import {HomeService} from './home.service'; 4 | import * as $ from 'jquery'; 5 | @Component({ 6 | selector: 'home', 7 | styleUrls: ['./home.style.css'], 8 | templateUrl: './home.template.html' 9 | }) 10 | export class Home { 11 | loading: string = 'false'; 12 | constructor(public appState:AppState, 13 | public homeService : HomeService) { 14 | 15 | } 16 | 17 | ngOnInit() { 18 | var selector = '.sample-content'; 19 | console.log('jquery', $(selector).text()); 20 | } 21 | 22 | changeState() { 23 | var self = this; 24 | self.appState.set('loading',true); 25 | self.loading = 'true'; 26 | setTimeout(() => { 27 | self.appState.set('loading', false); 28 | self.loading = 'false'; 29 | },2000); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/app/containers/home/home.e2e.ts: -------------------------------------------------------------------------------- 1 | describe('App', () => { 2 | 3 | beforeEach(() => { 4 | // change hash depending on router LocationStrategy 5 | browser.get('/#/home'); 6 | }); 7 | 8 | 9 | it('should have a title', () => { 10 | let subject = browser.getTitle(); 11 | let result = 'Angular2 Webpack Starter by @gdi2290 from @AngularClass'; 12 | expect(subject).toEqual(result); 13 | }); 14 | 15 | it('should have `your content here` x-large', () => { 16 | let subject = element(by.css('[x-large]')).getText(); 17 | let result = 'Your Content Here'; 18 | expect(subject).toEqual(result); 19 | }); 20 | 21 | 22 | }); 23 | -------------------------------------------------------------------------------- /src/app/containers/home/home.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chengfei on 16/9/19. 3 | */ 4 | import {Injectable} from '@angular/core'; 5 | import {Headers, Http} from '@angular/http'; 6 | import 'rxjs/add/operator/toPromise'; 7 | @Injectable() 8 | export class HomeService { 9 | private URL = 'http://wx.51e.com.cn/app/index.php?i=18&c=entry&do=VoteSubmit&m=sxs_vote'; 10 | private headers = new Headers({'Content-Type': 'application/json'}); 11 | constructor(private http:Http) { 12 | } 13 | 14 | getHomeData():Promise { 15 | let submitData = { 16 | "uid":'1111222', 17 | "openid":'222225', 18 | "voteid":'6', 19 | "optioniddata":['176'], 20 | }; 21 | return this.http 22 | .post(this.URL, JSON.stringify(submitData), {headers: this.headers}) 23 | .toPromise() 24 | .then(res => res.json().data) 25 | .catch(this.handleError); 26 | } 27 | 28 | private handleError(error: any): Promise { 29 | console.error('请求失败', error); 30 | return Promise.reject(error.message || error); 31 | } 32 | } -------------------------------------------------------------------------------- /src/app/containers/home/home.spec.ts: -------------------------------------------------------------------------------- 1 | import { 2 | inject, 3 | TestBed 4 | } from '@angular/core/testing'; 5 | import { Component } from '@angular/core'; 6 | import { 7 | BaseRequestOptions, 8 | ConnectionBackend, 9 | Http 10 | } from '@angular/http'; 11 | import { MockBackend } from '@angular/http/testing'; 12 | 13 | // Load the implementations that should be tested 14 | import { AppState } from '../../app.service'; 15 | import { Home } from './home.component'; 16 | import { Title } from './title'; 17 | 18 | describe('Home', () => { 19 | // provide our implementations or mocks to the dependency injector 20 | beforeEach(() => TestBed.configureTestingModule({ 21 | providers: [ 22 | BaseRequestOptions, 23 | MockBackend, 24 | { 25 | provide: Http, 26 | useFactory: function(backend: ConnectionBackend, defaultOptions: BaseRequestOptions) { 27 | return new Http(backend, defaultOptions); 28 | }, 29 | deps: [MockBackend, BaseRequestOptions] 30 | }, 31 | AppState, 32 | Title, 33 | Home 34 | ] 35 | })); 36 | 37 | it('should have default data', inject([ Home ], (home: Home) => { 38 | expect(home.localState).toEqual({ value: '' }); 39 | })); 40 | 41 | it('should have a title', inject([ Home ], (home: Home) => { 42 | expect(!!home.title).toEqual(true); 43 | })); 44 | 45 | it('should log ngOnInit', inject([ Home ], (home: Home) => { 46 | spyOn(console, 'log'); 47 | expect(console.log).not.toHaveBeenCalled(); 48 | 49 | home.ngOnInit(); 50 | expect(console.log).toHaveBeenCalled(); 51 | })); 52 | 53 | }); 54 | -------------------------------------------------------------------------------- /src/app/containers/home/home.style.css: -------------------------------------------------------------------------------- 1 | /*styles for home content only*/ 2 | -------------------------------------------------------------------------------- /src/app/containers/home/home.template.html: -------------------------------------------------------------------------------- 1 |
2 |

欢迎使用本系统

3 |
4 |

全局state中loading:{{loading}}

5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /src/app/containers/home/index.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { FormsModule } from '@angular/forms'; 3 | import { NgModule } from '@angular/core'; 4 | import { RouterModule } from '@angular/router'; 5 | 6 | import { Home } from './home.component'; 7 | import {HomeService} from './home.service'; 8 | console.log('`Home` bundle loaded asynchronously'); 9 | export const routes = [ 10 | { path: '', component: Home, pathMatch: 'full' } 11 | ]; 12 | 13 | @NgModule({ 14 | declarations: [ 15 | Home 16 | ], 17 | imports: [ 18 | CommonModule, 19 | FormsModule, 20 | RouterModule.forChild(routes), 21 | ], 22 | providers: [ 23 | HomeService 24 | ] 25 | }) 26 | export default class AboutModule { 27 | static routes = routes; 28 | } 29 | -------------------------------------------------------------------------------- /src/app/containers/home/title/index.ts: -------------------------------------------------------------------------------- 1 | export * from './title.service'; 2 | -------------------------------------------------------------------------------- /src/app/containers/home/title/title.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Http } from '@angular/http'; 3 | 4 | @Injectable() 5 | export class Title { 6 | value = 'Angular 2'; 7 | constructor(public http: Http) { 8 | 9 | } 10 | 11 | getData() { 12 | console.log('Title#getData(): Get Data'); 13 | // return this.http.get('/assets/data.json') 14 | // .map(res => res.json()); 15 | return { 16 | value: 'AngularClass' 17 | }; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/app/containers/home/title/title.spec.ts: -------------------------------------------------------------------------------- 1 | import { 2 | inject, 3 | TestBed 4 | } from '@angular/core/testing'; 5 | import { Component } from '@angular/core'; 6 | import { 7 | BaseRequestOptions, 8 | ConnectionBackend, 9 | Http 10 | } from '@angular/http'; 11 | import { MockBackend } from '@angular/http/testing'; 12 | 13 | import { Title } from './title.service'; 14 | 15 | describe('Title', () => { 16 | beforeEach(() => TestBed.configureTestingModule({ 17 | providers: [ 18 | BaseRequestOptions, 19 | MockBackend, 20 | { 21 | provide: Http, 22 | useFactory: function(backend: ConnectionBackend, defaultOptions: BaseRequestOptions) { 23 | return new Http(backend, defaultOptions); 24 | }, 25 | deps: [MockBackend, BaseRequestOptions] 26 | }, 27 | Title 28 | ]})); 29 | 30 | it('should have http', inject([ Title ], (title: Title) => { 31 | expect(!!title.http).toEqual(true); 32 | })); 33 | 34 | it('should get data from the server', inject([ Title ], (title: Title) => { 35 | spyOn(console, 'log'); 36 | expect(console.log).not.toHaveBeenCalled(); 37 | 38 | title.getData(); 39 | expect(console.log).toHaveBeenCalled(); 40 | expect(title.getData()).toEqual({ value: 'AngularClass' }); 41 | })); 42 | 43 | }); 44 | -------------------------------------------------------------------------------- /src/app/containers/home/x-large/index.ts: -------------------------------------------------------------------------------- 1 | export * from './x-large.directive'; 2 | -------------------------------------------------------------------------------- /src/app/containers/home/x-large/x-large.directive.ts: -------------------------------------------------------------------------------- 1 | import { Component, Directive, ElementRef, Renderer } from '@angular/core'; 2 | /* 3 | * Directive 4 | * XLarge is a simple directive to show how one is made 5 | */ 6 | @Directive({ 7 | selector: '[x-large]' // using [ ] means selecting attributes 8 | }) 9 | export class XLarge { 10 | constructor(element: ElementRef, renderer: Renderer) { 11 | // simple DOM manipulation to set font size to x-large 12 | // `nativeElement` is the direct reference to the DOM element 13 | // element.nativeElement.style.fontSize = 'x-large'; 14 | 15 | // for server/webworker support use the renderer 16 | renderer.setElementStyle(element.nativeElement, 'fontSize', 'x-large'); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/app/containers/home/x-large/x-large.spec.ts: -------------------------------------------------------------------------------- 1 | import { 2 | fakeAsync, 3 | inject, 4 | tick, 5 | TestBed 6 | } from '@angular/core/testing'; 7 | import { Component } from '@angular/core'; 8 | import { BaseRequestOptions, Http } from '@angular/http'; 9 | import { By } from '@angular/platform-browser/src/dom/debug/by'; 10 | import { MockBackend } from '@angular/http/testing'; 11 | 12 | // Load the implementations that should be tested 13 | import { XLarge } from './x-large.directive'; 14 | 15 | describe('x-large directive', () => { 16 | // Create a test component to test directives 17 | @Component({ 18 | template: '
Content
' 19 | }) 20 | class TestComponent { } 21 | 22 | beforeEach(() => { 23 | TestBed.configureTestingModule({ 24 | declarations: [ 25 | XLarge, 26 | TestComponent 27 | ] 28 | }); 29 | }); 30 | 31 | it('should sent font-size to x-large', fakeAsync(() => { 32 | TestBed.compileComponents().then(() => { 33 | 34 | const fixture = TestBed.createComponent(TestComponent); 35 | fixture.detectChanges(); 36 | tick(); 37 | const element = fixture.debugElement.query(By.css('div')); 38 | 39 | expect(element.nativeElement.style.fontSize).toBe('x-large'); 40 | 41 | }); 42 | })); 43 | 44 | }); 45 | -------------------------------------------------------------------------------- /src/app/containers/login/login.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chengfei on 16/8/30. 3 | */ 4 | import {Component, OnInit} from '@angular/core'; 5 | import {Router} from '@angular/router'; 6 | @Component({ 7 | selector: 'login', 8 | templateUrl: 'login.template.html', 9 | styleUrls: ['./login.style.css'] 10 | }) 11 | export class LoginComponent implements OnInit { 12 | constructor(public router:Router) { 13 | } 14 | 15 | ngOnInit() { 16 | } 17 | 18 | goToDetail():void { 19 | // this.router.navigate([`/user/${loginname}`]); 20 | // this.router.navigate(['/user', loginname]); 21 | this.router.navigate(['/dashboard']); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/app/containers/login/login.style.css: -------------------------------------------------------------------------------- 1 | .login{ 2 | position: absolute; 3 | left: 30%; 4 | } -------------------------------------------------------------------------------- /src/app/containers/login/login.template.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/containers/no-content/index.ts: -------------------------------------------------------------------------------- 1 | export * from './no-content'; 2 | -------------------------------------------------------------------------------- /src/app/containers/no-content/no-content.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chengfei on 16/8/25. 3 | */ 4 | import { Component } from '@angular/core'; 5 | 6 | @Component({ 7 | selector: 'no-content', 8 | template: ` 9 |
10 |

404: 页面没有找到

11 |
12 | ` 13 | }) 14 | export class NoContent { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/app/environment.ts: -------------------------------------------------------------------------------- 1 | 2 | // Angular 2 3 | // rc2 workaround 4 | import { enableDebugTools, disableDebugTools } from '@angular/platform-browser'; 5 | import { enableProdMode, ApplicationRef } from '@angular/core'; 6 | // Environment Providers 7 | let PROVIDERS: any[] = [ 8 | // common env directives 9 | ]; 10 | 11 | // Angular debug tools in the dev console 12 | // https://github.com/angular/angular/blob/86405345b781a9dc2438c0fbe3e9409245647019/TOOLS_JS.md 13 | let _decorateModuleRef = function identity(value: T): T { return value; }; 14 | 15 | if ('production' === ENV) { 16 | // Production 17 | disableDebugTools(); 18 | enableProdMode(); 19 | 20 | PROVIDERS = [ 21 | ...PROVIDERS, 22 | // custom providers in production 23 | ]; 24 | 25 | } else { 26 | 27 | _decorateModuleRef = (modRef: any) => { 28 | const appRef = modRef.injector.get(ApplicationRef); 29 | const cmpRef = appRef.components[0]; 30 | 31 | let _ng = (window).ng; 32 | enableDebugTools(cmpRef); 33 | (window).ng.probe = _ng.probe; 34 | (window).ng.coreTokens = _ng.coreTokens; 35 | return modRef; 36 | }; 37 | 38 | // Development 39 | PROVIDERS = [ 40 | ...PROVIDERS, 41 | // custom providers in development 42 | ]; 43 | 44 | } 45 | 46 | export const decorateModuleRef = _decorateModuleRef; 47 | 48 | export const ENV_PROVIDERS = [ 49 | ...PROVIDERS 50 | ]; 51 | -------------------------------------------------------------------------------- /src/app/index.ts: -------------------------------------------------------------------------------- 1 | // App 2 | export * from './app.module'; 3 | -------------------------------------------------------------------------------- /src/app/no-content/index.ts: -------------------------------------------------------------------------------- 1 | export * from './no-content'; 2 | -------------------------------------------------------------------------------- /src/app/no-content/no-content.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'no-content', 5 | template: ` 6 |
7 |

404: page missing

8 |
9 | ` 10 | }) 11 | export class NoContent { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/.DS_Store -------------------------------------------------------------------------------- /src/assets/css/.gitkeep: -------------------------------------------------------------------------------- 1 | @AngularClass 2 | -------------------------------------------------------------------------------- /src/assets/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "value": "AngularClass" 3 | } 4 | -------------------------------------------------------------------------------- /src/assets/humans.txt: -------------------------------------------------------------------------------- 1 | # humanstxt.org/ 2 | # The humans responsible & technology colophon 3 | 4 | # TEAM 5 | 6 | -- -- 7 | 8 | # THANKS 9 | 10 | 11 | PatrickJS -- @gdi2290 12 | AngularClass -- @AngularClass 13 | 14 | # TECHNOLOGY COLOPHON 15 | 16 | HTML5, CSS3 17 | Angular2, TypeScript, Webpack 18 | -------------------------------------------------------------------------------- /src/assets/icon/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/android-icon-144x144.png -------------------------------------------------------------------------------- /src/assets/icon/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/android-icon-192x192.png -------------------------------------------------------------------------------- /src/assets/icon/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/android-icon-36x36.png -------------------------------------------------------------------------------- /src/assets/icon/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/android-icon-48x48.png -------------------------------------------------------------------------------- /src/assets/icon/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/android-icon-72x72.png -------------------------------------------------------------------------------- /src/assets/icon/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/android-icon-96x96.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon-114x114.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon-120x120.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon-144x144.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon-152x152.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon-180x180.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon-57x57.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon-60x60.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon-72x72.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon-76x76.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon-precomposed.png -------------------------------------------------------------------------------- /src/assets/icon/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/apple-icon.png -------------------------------------------------------------------------------- /src/assets/icon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff -------------------------------------------------------------------------------- /src/assets/icon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/favicon-16x16.png -------------------------------------------------------------------------------- /src/assets/icon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/favicon-32x32.png -------------------------------------------------------------------------------- /src/assets/icon/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/favicon-96x96.png -------------------------------------------------------------------------------- /src/assets/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/favicon.ico -------------------------------------------------------------------------------- /src/assets/icon/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/ms-icon-144x144.png -------------------------------------------------------------------------------- /src/assets/icon/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/ms-icon-150x150.png -------------------------------------------------------------------------------- /src/assets/icon/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/ms-icon-310x310.png -------------------------------------------------------------------------------- /src/assets/icon/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/icon/ms-icon-70x70.png -------------------------------------------------------------------------------- /src/assets/img/angular-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/img/angular-logo.png -------------------------------------------------------------------------------- /src/assets/img/angularclass-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/img/angularclass-avatar.png -------------------------------------------------------------------------------- /src/assets/img/angularclass-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/img/angularclass-logo.png -------------------------------------------------------------------------------- /src/assets/libs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/libs/.DS_Store -------------------------------------------------------------------------------- /src/assets/libs/font-awesome-4.2.0/css/font-awesome.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | /* FONT PATH 6 | * -------------------------- */ 7 | @font-face { 8 | font-family: 'FontAwesome'; 9 | src: url('../fonts/fontawesome-webfont.eot?v=4.2.0'); 10 | src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg'); 11 | font-weight: normal; 12 | font-style: normal; 13 | } 14 | .fa { 15 | display: inline-block; 16 | font: normal normal normal 14px/1 FontAwesome; 17 | font-size: inherit; 18 | text-rendering: auto; 19 | -webkit-font-smoothing: antialiased; 20 | -moz-osx-font-smoothing: grayscale; 21 | } 22 | /* makes the font 33% larger relative to the icon container */ 23 | .fa-lg { 24 | font-size: 1.33333333em; 25 | line-height: 0.75em; 26 | vertical-align: -15%; 27 | } 28 | .fa-2x { 29 | font-size: 2em; 30 | } 31 | .fa-3x { 32 | font-size: 3em; 33 | } 34 | .fa-4x { 35 | font-size: 4em; 36 | } 37 | .fa-5x { 38 | font-size: 5em; 39 | } 40 | .fa-fw { 41 | width: 1.28571429em; 42 | text-align: center; 43 | } 44 | .fa-ul { 45 | padding-left: 0; 46 | margin-left: 2.14285714em; 47 | list-style-type: none; 48 | } 49 | .fa-ul > li { 50 | position: relative; 51 | } 52 | .fa-li { 53 | position: absolute; 54 | left: -2.14285714em; 55 | width: 2.14285714em; 56 | top: 0.14285714em; 57 | text-align: center; 58 | } 59 | .fa-li.fa-lg { 60 | left: -1.85714286em; 61 | } 62 | .fa-border { 63 | padding: .2em .25em .15em; 64 | border: solid 0.08em #eeeeee; 65 | border-radius: .1em; 66 | } 67 | .pull-right { 68 | float: right; 69 | } 70 | .pull-left { 71 | float: left; 72 | } 73 | .fa.pull-left { 74 | margin-right: .3em; 75 | } 76 | .fa.pull-right { 77 | margin-left: .3em; 78 | } 79 | .fa-spin { 80 | -webkit-animation: fa-spin 2s infinite linear; 81 | animation: fa-spin 2s infinite linear; 82 | } 83 | @-webkit-keyframes fa-spin { 84 | 0% { 85 | -webkit-transform: rotate(0deg); 86 | transform: rotate(0deg); 87 | } 88 | 100% { 89 | -webkit-transform: rotate(359deg); 90 | transform: rotate(359deg); 91 | } 92 | } 93 | @keyframes fa-spin { 94 | 0% { 95 | -webkit-transform: rotate(0deg); 96 | transform: rotate(0deg); 97 | } 98 | 100% { 99 | -webkit-transform: rotate(359deg); 100 | transform: rotate(359deg); 101 | } 102 | } 103 | .fa-rotate-90 { 104 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); 105 | -webkit-transform: rotate(90deg); 106 | -ms-transform: rotate(90deg); 107 | transform: rotate(90deg); 108 | } 109 | .fa-rotate-180 { 110 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); 111 | -webkit-transform: rotate(180deg); 112 | -ms-transform: rotate(180deg); 113 | transform: rotate(180deg); 114 | } 115 | .fa-rotate-270 { 116 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); 117 | -webkit-transform: rotate(270deg); 118 | -ms-transform: rotate(270deg); 119 | transform: rotate(270deg); 120 | } 121 | .fa-flip-horizontal { 122 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); 123 | -webkit-transform: scale(-1, 1); 124 | -ms-transform: scale(-1, 1); 125 | transform: scale(-1, 1); 126 | } 127 | .fa-flip-vertical { 128 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); 129 | -webkit-transform: scale(1, -1); 130 | -ms-transform: scale(1, -1); 131 | transform: scale(1, -1); 132 | } 133 | :root .fa-rotate-90, 134 | :root .fa-rotate-180, 135 | :root .fa-rotate-270, 136 | :root .fa-flip-horizontal, 137 | :root .fa-flip-vertical { 138 | filter: none; 139 | } 140 | .fa-stack { 141 | position: relative; 142 | display: inline-block; 143 | width: 2em; 144 | height: 2em; 145 | line-height: 2em; 146 | vertical-align: middle; 147 | } 148 | .fa-stack-1x, 149 | .fa-stack-2x { 150 | position: absolute; 151 | left: 0; 152 | width: 100%; 153 | text-align: center; 154 | } 155 | .fa-stack-1x { 156 | line-height: inherit; 157 | } 158 | .fa-stack-2x { 159 | font-size: 2em; 160 | } 161 | .fa-inverse { 162 | color: #ffffff; 163 | } 164 | /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen 165 | readers do not read off random characters that represent icons */ 166 | .fa-glass:before { 167 | content: "\f000"; 168 | } 169 | .fa-music:before { 170 | content: "\f001"; 171 | } 172 | .fa-search:before { 173 | content: "\f002"; 174 | } 175 | .fa-envelope-o:before { 176 | content: "\f003"; 177 | } 178 | .fa-heart:before { 179 | content: "\f004"; 180 | } 181 | .fa-star:before { 182 | content: "\f005"; 183 | } 184 | .fa-star-o:before { 185 | content: "\f006"; 186 | } 187 | .fa-user:before { 188 | content: "\f007"; 189 | } 190 | .fa-film:before { 191 | content: "\f008"; 192 | } 193 | .fa-th-large:before { 194 | content: "\f009"; 195 | } 196 | .fa-th:before { 197 | content: "\f00a"; 198 | } 199 | .fa-th-list:before { 200 | content: "\f00b"; 201 | } 202 | .fa-check:before { 203 | content: "\f00c"; 204 | } 205 | .fa-remove:before, 206 | .fa-close:before, 207 | .fa-times:before { 208 | content: "\f00d"; 209 | } 210 | .fa-search-plus:before { 211 | content: "\f00e"; 212 | } 213 | .fa-search-minus:before { 214 | content: "\f010"; 215 | } 216 | .fa-power-off:before { 217 | content: "\f011"; 218 | } 219 | .fa-signal:before { 220 | content: "\f012"; 221 | } 222 | .fa-gear:before, 223 | .fa-cog:before { 224 | content: "\f013"; 225 | } 226 | .fa-trash-o:before { 227 | content: "\f014"; 228 | } 229 | .fa-home:before { 230 | content: "\f015"; 231 | } 232 | .fa-file-o:before { 233 | content: "\f016"; 234 | } 235 | .fa-clock-o:before { 236 | content: "\f017"; 237 | } 238 | .fa-road:before { 239 | content: "\f018"; 240 | } 241 | .fa-download:before { 242 | content: "\f019"; 243 | } 244 | .fa-arrow-circle-o-down:before { 245 | content: "\f01a"; 246 | } 247 | .fa-arrow-circle-o-up:before { 248 | content: "\f01b"; 249 | } 250 | .fa-inbox:before { 251 | content: "\f01c"; 252 | } 253 | .fa-play-circle-o:before { 254 | content: "\f01d"; 255 | } 256 | .fa-rotate-right:before, 257 | .fa-repeat:before { 258 | content: "\f01e"; 259 | } 260 | .fa-refresh:before { 261 | content: "\f021"; 262 | } 263 | .fa-list-alt:before { 264 | content: "\f022"; 265 | } 266 | .fa-lock:before { 267 | content: "\f023"; 268 | } 269 | .fa-flag:before { 270 | content: "\f024"; 271 | } 272 | .fa-headphones:before { 273 | content: "\f025"; 274 | } 275 | .fa-volume-off:before { 276 | content: "\f026"; 277 | } 278 | .fa-volume-down:before { 279 | content: "\f027"; 280 | } 281 | .fa-volume-up:before { 282 | content: "\f028"; 283 | } 284 | .fa-qrcode:before { 285 | content: "\f029"; 286 | } 287 | .fa-barcode:before { 288 | content: "\f02a"; 289 | } 290 | .fa-tag:before { 291 | content: "\f02b"; 292 | } 293 | .fa-tags:before { 294 | content: "\f02c"; 295 | } 296 | .fa-book:before { 297 | content: "\f02d"; 298 | } 299 | .fa-bookmark:before { 300 | content: "\f02e"; 301 | } 302 | .fa-print:before { 303 | content: "\f02f"; 304 | } 305 | .fa-camera:before { 306 | content: "\f030"; 307 | } 308 | .fa-font:before { 309 | content: "\f031"; 310 | } 311 | .fa-bold:before { 312 | content: "\f032"; 313 | } 314 | .fa-italic:before { 315 | content: "\f033"; 316 | } 317 | .fa-text-height:before { 318 | content: "\f034"; 319 | } 320 | .fa-text-width:before { 321 | content: "\f035"; 322 | } 323 | .fa-align-left:before { 324 | content: "\f036"; 325 | } 326 | .fa-align-center:before { 327 | content: "\f037"; 328 | } 329 | .fa-align-right:before { 330 | content: "\f038"; 331 | } 332 | .fa-align-justify:before { 333 | content: "\f039"; 334 | } 335 | .fa-list:before { 336 | content: "\f03a"; 337 | } 338 | .fa-dedent:before, 339 | .fa-outdent:before { 340 | content: "\f03b"; 341 | } 342 | .fa-indent:before { 343 | content: "\f03c"; 344 | } 345 | .fa-video-camera:before { 346 | content: "\f03d"; 347 | } 348 | .fa-photo:before, 349 | .fa-image:before, 350 | .fa-picture-o:before { 351 | content: "\f03e"; 352 | } 353 | .fa-pencil:before { 354 | content: "\f040"; 355 | } 356 | .fa-map-marker:before { 357 | content: "\f041"; 358 | } 359 | .fa-adjust:before { 360 | content: "\f042"; 361 | } 362 | .fa-tint:before { 363 | content: "\f043"; 364 | } 365 | .fa-edit:before, 366 | .fa-pencil-square-o:before { 367 | content: "\f044"; 368 | } 369 | .fa-share-square-o:before { 370 | content: "\f045"; 371 | } 372 | .fa-check-square-o:before { 373 | content: "\f046"; 374 | } 375 | .fa-arrows:before { 376 | content: "\f047"; 377 | } 378 | .fa-step-backward:before { 379 | content: "\f048"; 380 | } 381 | .fa-fast-backward:before { 382 | content: "\f049"; 383 | } 384 | .fa-backward:before { 385 | content: "\f04a"; 386 | } 387 | .fa-play:before { 388 | content: "\f04b"; 389 | } 390 | .fa-pause:before { 391 | content: "\f04c"; 392 | } 393 | .fa-stop:before { 394 | content: "\f04d"; 395 | } 396 | .fa-forward:before { 397 | content: "\f04e"; 398 | } 399 | .fa-fast-forward:before { 400 | content: "\f050"; 401 | } 402 | .fa-step-forward:before { 403 | content: "\f051"; 404 | } 405 | .fa-eject:before { 406 | content: "\f052"; 407 | } 408 | .fa-chevron-left:before { 409 | content: "\f053"; 410 | } 411 | .fa-chevron-right:before { 412 | content: "\f054"; 413 | } 414 | .fa-plus-circle:before { 415 | content: "\f055"; 416 | } 417 | .fa-minus-circle:before { 418 | content: "\f056"; 419 | } 420 | .fa-times-circle:before { 421 | content: "\f057"; 422 | } 423 | .fa-check-circle:before { 424 | content: "\f058"; 425 | } 426 | .fa-question-circle:before { 427 | content: "\f059"; 428 | } 429 | .fa-info-circle:before { 430 | content: "\f05a"; 431 | } 432 | .fa-crosshairs:before { 433 | content: "\f05b"; 434 | } 435 | .fa-times-circle-o:before { 436 | content: "\f05c"; 437 | } 438 | .fa-check-circle-o:before { 439 | content: "\f05d"; 440 | } 441 | .fa-ban:before { 442 | content: "\f05e"; 443 | } 444 | .fa-arrow-left:before { 445 | content: "\f060"; 446 | } 447 | .fa-arrow-right:before { 448 | content: "\f061"; 449 | } 450 | .fa-arrow-up:before { 451 | content: "\f062"; 452 | } 453 | .fa-arrow-down:before { 454 | content: "\f063"; 455 | } 456 | .fa-mail-forward:before, 457 | .fa-share:before { 458 | content: "\f064"; 459 | } 460 | .fa-expand:before { 461 | content: "\f065"; 462 | } 463 | .fa-compress:before { 464 | content: "\f066"; 465 | } 466 | .fa-plus:before { 467 | content: "\f067"; 468 | } 469 | .fa-minus:before { 470 | content: "\f068"; 471 | } 472 | .fa-asterisk:before { 473 | content: "\f069"; 474 | } 475 | .fa-exclamation-circle:before { 476 | content: "\f06a"; 477 | } 478 | .fa-gift:before { 479 | content: "\f06b"; 480 | } 481 | .fa-leaf:before { 482 | content: "\f06c"; 483 | } 484 | .fa-fire:before { 485 | content: "\f06d"; 486 | } 487 | .fa-eye:before { 488 | content: "\f06e"; 489 | } 490 | .fa-eye-slash:before { 491 | content: "\f070"; 492 | } 493 | .fa-warning:before, 494 | .fa-exclamation-triangle:before { 495 | content: "\f071"; 496 | } 497 | .fa-plane:before { 498 | content: "\f072"; 499 | } 500 | .fa-calendar:before { 501 | content: "\f073"; 502 | } 503 | .fa-random:before { 504 | content: "\f074"; 505 | } 506 | .fa-comment:before { 507 | content: "\f075"; 508 | } 509 | .fa-magnet:before { 510 | content: "\f076"; 511 | } 512 | .fa-chevron-up:before { 513 | content: "\f077"; 514 | } 515 | .fa-chevron-down:before { 516 | content: "\f078"; 517 | } 518 | .fa-retweet:before { 519 | content: "\f079"; 520 | } 521 | .fa-shopping-cart:before { 522 | content: "\f07a"; 523 | } 524 | .fa-folder:before { 525 | content: "\f07b"; 526 | } 527 | .fa-folder-open:before { 528 | content: "\f07c"; 529 | } 530 | .fa-arrows-v:before { 531 | content: "\f07d"; 532 | } 533 | .fa-arrows-h:before { 534 | content: "\f07e"; 535 | } 536 | .fa-bar-chart-o:before, 537 | .fa-bar-chart:before { 538 | content: "\f080"; 539 | } 540 | .fa-twitter-square:before { 541 | content: "\f081"; 542 | } 543 | .fa-facebook-square:before { 544 | content: "\f082"; 545 | } 546 | .fa-camera-retro:before { 547 | content: "\f083"; 548 | } 549 | .fa-key:before { 550 | content: "\f084"; 551 | } 552 | .fa-gears:before, 553 | .fa-cogs:before { 554 | content: "\f085"; 555 | } 556 | .fa-comments:before { 557 | content: "\f086"; 558 | } 559 | .fa-thumbs-o-up:before { 560 | content: "\f087"; 561 | } 562 | .fa-thumbs-o-down:before { 563 | content: "\f088"; 564 | } 565 | .fa-star-half:before { 566 | content: "\f089"; 567 | } 568 | .fa-heart-o:before { 569 | content: "\f08a"; 570 | } 571 | .fa-sign-out:before { 572 | content: "\f08b"; 573 | } 574 | .fa-linkedin-square:before { 575 | content: "\f08c"; 576 | } 577 | .fa-thumb-tack:before { 578 | content: "\f08d"; 579 | } 580 | .fa-external-link:before { 581 | content: "\f08e"; 582 | } 583 | .fa-sign-in:before { 584 | content: "\f090"; 585 | } 586 | .fa-trophy:before { 587 | content: "\f091"; 588 | } 589 | .fa-github-square:before { 590 | content: "\f092"; 591 | } 592 | .fa-upload:before { 593 | content: "\f093"; 594 | } 595 | .fa-lemon-o:before { 596 | content: "\f094"; 597 | } 598 | .fa-phone:before { 599 | content: "\f095"; 600 | } 601 | .fa-square-o:before { 602 | content: "\f096"; 603 | } 604 | .fa-bookmark-o:before { 605 | content: "\f097"; 606 | } 607 | .fa-phone-square:before { 608 | content: "\f098"; 609 | } 610 | .fa-twitter:before { 611 | content: "\f099"; 612 | } 613 | .fa-facebook:before { 614 | content: "\f09a"; 615 | } 616 | .fa-github:before { 617 | content: "\f09b"; 618 | } 619 | .fa-unlock:before { 620 | content: "\f09c"; 621 | } 622 | .fa-credit-card:before { 623 | content: "\f09d"; 624 | } 625 | .fa-rss:before { 626 | content: "\f09e"; 627 | } 628 | .fa-hdd-o:before { 629 | content: "\f0a0"; 630 | } 631 | .fa-bullhorn:before { 632 | content: "\f0a1"; 633 | } 634 | .fa-bell:before { 635 | content: "\f0f3"; 636 | } 637 | .fa-certificate:before { 638 | content: "\f0a3"; 639 | } 640 | .fa-hand-o-right:before { 641 | content: "\f0a4"; 642 | } 643 | .fa-hand-o-left:before { 644 | content: "\f0a5"; 645 | } 646 | .fa-hand-o-up:before { 647 | content: "\f0a6"; 648 | } 649 | .fa-hand-o-down:before { 650 | content: "\f0a7"; 651 | } 652 | .fa-arrow-circle-left:before { 653 | content: "\f0a8"; 654 | } 655 | .fa-arrow-circle-right:before { 656 | content: "\f0a9"; 657 | } 658 | .fa-arrow-circle-up:before { 659 | content: "\f0aa"; 660 | } 661 | .fa-arrow-circle-down:before { 662 | content: "\f0ab"; 663 | } 664 | .fa-globe:before { 665 | content: "\f0ac"; 666 | } 667 | .fa-wrench:before { 668 | content: "\f0ad"; 669 | } 670 | .fa-tasks:before { 671 | content: "\f0ae"; 672 | } 673 | .fa-filter:before { 674 | content: "\f0b0"; 675 | } 676 | .fa-briefcase:before { 677 | content: "\f0b1"; 678 | } 679 | .fa-arrows-alt:before { 680 | content: "\f0b2"; 681 | } 682 | .fa-group:before, 683 | .fa-users:before { 684 | content: "\f0c0"; 685 | } 686 | .fa-chain:before, 687 | .fa-link:before { 688 | content: "\f0c1"; 689 | } 690 | .fa-cloud:before { 691 | content: "\f0c2"; 692 | } 693 | .fa-flask:before { 694 | content: "\f0c3"; 695 | } 696 | .fa-cut:before, 697 | .fa-scissors:before { 698 | content: "\f0c4"; 699 | } 700 | .fa-copy:before, 701 | .fa-files-o:before { 702 | content: "\f0c5"; 703 | } 704 | .fa-paperclip:before { 705 | content: "\f0c6"; 706 | } 707 | .fa-save:before, 708 | .fa-floppy-o:before { 709 | content: "\f0c7"; 710 | } 711 | .fa-square:before { 712 | content: "\f0c8"; 713 | } 714 | .fa-navicon:before, 715 | .fa-reorder:before, 716 | .fa-bars:before { 717 | content: "\f0c9"; 718 | } 719 | .fa-list-ul:before { 720 | content: "\f0ca"; 721 | } 722 | .fa-list-ol:before { 723 | content: "\f0cb"; 724 | } 725 | .fa-strikethrough:before { 726 | content: "\f0cc"; 727 | } 728 | .fa-underline:before { 729 | content: "\f0cd"; 730 | } 731 | .fa-table:before { 732 | content: "\f0ce"; 733 | } 734 | .fa-magic:before { 735 | content: "\f0d0"; 736 | } 737 | .fa-truck:before { 738 | content: "\f0d1"; 739 | } 740 | .fa-pinterest:before { 741 | content: "\f0d2"; 742 | } 743 | .fa-pinterest-square:before { 744 | content: "\f0d3"; 745 | } 746 | .fa-google-plus-square:before { 747 | content: "\f0d4"; 748 | } 749 | .fa-google-plus:before { 750 | content: "\f0d5"; 751 | } 752 | .fa-money:before { 753 | content: "\f0d6"; 754 | } 755 | .fa-caret-down:before { 756 | content: "\f0d7"; 757 | } 758 | .fa-caret-up:before { 759 | content: "\f0d8"; 760 | } 761 | .fa-caret-left:before { 762 | content: "\f0d9"; 763 | } 764 | .fa-caret-right:before { 765 | content: "\f0da"; 766 | } 767 | .fa-columns:before { 768 | content: "\f0db"; 769 | } 770 | .fa-unsorted:before, 771 | .fa-sort:before { 772 | content: "\f0dc"; 773 | } 774 | .fa-sort-down:before, 775 | .fa-sort-desc:before { 776 | content: "\f0dd"; 777 | } 778 | .fa-sort-up:before, 779 | .fa-sort-asc:before { 780 | content: "\f0de"; 781 | } 782 | .fa-envelope:before { 783 | content: "\f0e0"; 784 | } 785 | .fa-linkedin:before { 786 | content: "\f0e1"; 787 | } 788 | .fa-rotate-left:before, 789 | .fa-undo:before { 790 | content: "\f0e2"; 791 | } 792 | .fa-legal:before, 793 | .fa-gavel:before { 794 | content: "\f0e3"; 795 | } 796 | .fa-dashboard:before, 797 | .fa-tachometer:before { 798 | content: "\f0e4"; 799 | } 800 | .fa-comment-o:before { 801 | content: "\f0e5"; 802 | } 803 | .fa-comments-o:before { 804 | content: "\f0e6"; 805 | } 806 | .fa-flash:before, 807 | .fa-bolt:before { 808 | content: "\f0e7"; 809 | } 810 | .fa-sitemap:before { 811 | content: "\f0e8"; 812 | } 813 | .fa-umbrella:before { 814 | content: "\f0e9"; 815 | } 816 | .fa-paste:before, 817 | .fa-clipboard:before { 818 | content: "\f0ea"; 819 | } 820 | .fa-lightbulb-o:before { 821 | content: "\f0eb"; 822 | } 823 | .fa-exchange:before { 824 | content: "\f0ec"; 825 | } 826 | .fa-cloud-download:before { 827 | content: "\f0ed"; 828 | } 829 | .fa-cloud-upload:before { 830 | content: "\f0ee"; 831 | } 832 | .fa-user-md:before { 833 | content: "\f0f0"; 834 | } 835 | .fa-stethoscope:before { 836 | content: "\f0f1"; 837 | } 838 | .fa-suitcase:before { 839 | content: "\f0f2"; 840 | } 841 | .fa-bell-o:before { 842 | content: "\f0a2"; 843 | } 844 | .fa-coffee:before { 845 | content: "\f0f4"; 846 | } 847 | .fa-cutlery:before { 848 | content: "\f0f5"; 849 | } 850 | .fa-file-text-o:before { 851 | content: "\f0f6"; 852 | } 853 | .fa-building-o:before { 854 | content: "\f0f7"; 855 | } 856 | .fa-hospital-o:before { 857 | content: "\f0f8"; 858 | } 859 | .fa-ambulance:before { 860 | content: "\f0f9"; 861 | } 862 | .fa-medkit:before { 863 | content: "\f0fa"; 864 | } 865 | .fa-fighter-jet:before { 866 | content: "\f0fb"; 867 | } 868 | .fa-beer:before { 869 | content: "\f0fc"; 870 | } 871 | .fa-h-square:before { 872 | content: "\f0fd"; 873 | } 874 | .fa-plus-square:before { 875 | content: "\f0fe"; 876 | } 877 | .fa-angle-double-left:before { 878 | content: "\f100"; 879 | } 880 | .fa-angle-double-right:before { 881 | content: "\f101"; 882 | } 883 | .fa-angle-double-up:before { 884 | content: "\f102"; 885 | } 886 | .fa-angle-double-down:before { 887 | content: "\f103"; 888 | } 889 | .fa-angle-left:before { 890 | content: "\f104"; 891 | } 892 | .fa-angle-right:before { 893 | content: "\f105"; 894 | } 895 | .fa-angle-up:before { 896 | content: "\f106"; 897 | } 898 | .fa-angle-down:before { 899 | content: "\f107"; 900 | } 901 | .fa-desktop:before { 902 | content: "\f108"; 903 | } 904 | .fa-laptop:before { 905 | content: "\f109"; 906 | } 907 | .fa-tablet:before { 908 | content: "\f10a"; 909 | } 910 | .fa-mobile-phone:before, 911 | .fa-mobile:before { 912 | content: "\f10b"; 913 | } 914 | .fa-circle-o:before { 915 | content: "\f10c"; 916 | } 917 | .fa-quote-left:before { 918 | content: "\f10d"; 919 | } 920 | .fa-quote-right:before { 921 | content: "\f10e"; 922 | } 923 | .fa-spinner:before { 924 | content: "\f110"; 925 | } 926 | .fa-circle:before { 927 | content: "\f111"; 928 | } 929 | .fa-mail-reply:before, 930 | .fa-reply:before { 931 | content: "\f112"; 932 | } 933 | .fa-github-alt:before { 934 | content: "\f113"; 935 | } 936 | .fa-folder-o:before { 937 | content: "\f114"; 938 | } 939 | .fa-folder-open-o:before { 940 | content: "\f115"; 941 | } 942 | .fa-smile-o:before { 943 | content: "\f118"; 944 | } 945 | .fa-frown-o:before { 946 | content: "\f119"; 947 | } 948 | .fa-meh-o:before { 949 | content: "\f11a"; 950 | } 951 | .fa-gamepad:before { 952 | content: "\f11b"; 953 | } 954 | .fa-keyboard-o:before { 955 | content: "\f11c"; 956 | } 957 | .fa-flag-o:before { 958 | content: "\f11d"; 959 | } 960 | .fa-flag-checkered:before { 961 | content: "\f11e"; 962 | } 963 | .fa-terminal:before { 964 | content: "\f120"; 965 | } 966 | .fa-code:before { 967 | content: "\f121"; 968 | } 969 | .fa-mail-reply-all:before, 970 | .fa-reply-all:before { 971 | content: "\f122"; 972 | } 973 | .fa-star-half-empty:before, 974 | .fa-star-half-full:before, 975 | .fa-star-half-o:before { 976 | content: "\f123"; 977 | } 978 | .fa-location-arrow:before { 979 | content: "\f124"; 980 | } 981 | .fa-crop:before { 982 | content: "\f125"; 983 | } 984 | .fa-code-fork:before { 985 | content: "\f126"; 986 | } 987 | .fa-unlink:before, 988 | .fa-chain-broken:before { 989 | content: "\f127"; 990 | } 991 | .fa-question:before { 992 | content: "\f128"; 993 | } 994 | .fa-info:before { 995 | content: "\f129"; 996 | } 997 | .fa-exclamation:before { 998 | content: "\f12a"; 999 | } 1000 | .fa-superscript:before { 1001 | content: "\f12b"; 1002 | } 1003 | .fa-subscript:before { 1004 | content: "\f12c"; 1005 | } 1006 | .fa-eraser:before { 1007 | content: "\f12d"; 1008 | } 1009 | .fa-puzzle-piece:before { 1010 | content: "\f12e"; 1011 | } 1012 | .fa-microphone:before { 1013 | content: "\f130"; 1014 | } 1015 | .fa-microphone-slash:before { 1016 | content: "\f131"; 1017 | } 1018 | .fa-shield:before { 1019 | content: "\f132"; 1020 | } 1021 | .fa-calendar-o:before { 1022 | content: "\f133"; 1023 | } 1024 | .fa-fire-extinguisher:before { 1025 | content: "\f134"; 1026 | } 1027 | .fa-rocket:before { 1028 | content: "\f135"; 1029 | } 1030 | .fa-maxcdn:before { 1031 | content: "\f136"; 1032 | } 1033 | .fa-chevron-circle-left:before { 1034 | content: "\f137"; 1035 | } 1036 | .fa-chevron-circle-right:before { 1037 | content: "\f138"; 1038 | } 1039 | .fa-chevron-circle-up:before { 1040 | content: "\f139"; 1041 | } 1042 | .fa-chevron-circle-down:before { 1043 | content: "\f13a"; 1044 | } 1045 | .fa-html5:before { 1046 | content: "\f13b"; 1047 | } 1048 | .fa-css3:before { 1049 | content: "\f13c"; 1050 | } 1051 | .fa-anchor:before { 1052 | content: "\f13d"; 1053 | } 1054 | .fa-unlock-alt:before { 1055 | content: "\f13e"; 1056 | } 1057 | .fa-bullseye:before { 1058 | content: "\f140"; 1059 | } 1060 | .fa-ellipsis-h:before { 1061 | content: "\f141"; 1062 | } 1063 | .fa-ellipsis-v:before { 1064 | content: "\f142"; 1065 | } 1066 | .fa-rss-square:before { 1067 | content: "\f143"; 1068 | } 1069 | .fa-play-circle:before { 1070 | content: "\f144"; 1071 | } 1072 | .fa-ticket:before { 1073 | content: "\f145"; 1074 | } 1075 | .fa-minus-square:before { 1076 | content: "\f146"; 1077 | } 1078 | .fa-minus-square-o:before { 1079 | content: "\f147"; 1080 | } 1081 | .fa-level-up:before { 1082 | content: "\f148"; 1083 | } 1084 | .fa-level-down:before { 1085 | content: "\f149"; 1086 | } 1087 | .fa-check-square:before { 1088 | content: "\f14a"; 1089 | } 1090 | .fa-pencil-square:before { 1091 | content: "\f14b"; 1092 | } 1093 | .fa-external-link-square:before { 1094 | content: "\f14c"; 1095 | } 1096 | .fa-share-square:before { 1097 | content: "\f14d"; 1098 | } 1099 | .fa-compass:before { 1100 | content: "\f14e"; 1101 | } 1102 | .fa-toggle-down:before, 1103 | .fa-caret-square-o-down:before { 1104 | content: "\f150"; 1105 | } 1106 | .fa-toggle-up:before, 1107 | .fa-caret-square-o-up:before { 1108 | content: "\f151"; 1109 | } 1110 | .fa-toggle-right:before, 1111 | .fa-caret-square-o-right:before { 1112 | content: "\f152"; 1113 | } 1114 | .fa-euro:before, 1115 | .fa-eur:before { 1116 | content: "\f153"; 1117 | } 1118 | .fa-gbp:before { 1119 | content: "\f154"; 1120 | } 1121 | .fa-dollar:before, 1122 | .fa-usd:before { 1123 | content: "\f155"; 1124 | } 1125 | .fa-rupee:before, 1126 | .fa-inr:before { 1127 | content: "\f156"; 1128 | } 1129 | .fa-cny:before, 1130 | .fa-rmb:before, 1131 | .fa-yen:before, 1132 | .fa-jpy:before { 1133 | content: "\f157"; 1134 | } 1135 | .fa-ruble:before, 1136 | .fa-rouble:before, 1137 | .fa-rub:before { 1138 | content: "\f158"; 1139 | } 1140 | .fa-won:before, 1141 | .fa-krw:before { 1142 | content: "\f159"; 1143 | } 1144 | .fa-bitcoin:before, 1145 | .fa-btc:before { 1146 | content: "\f15a"; 1147 | } 1148 | .fa-file:before { 1149 | content: "\f15b"; 1150 | } 1151 | .fa-file-text:before { 1152 | content: "\f15c"; 1153 | } 1154 | .fa-sort-alpha-asc:before { 1155 | content: "\f15d"; 1156 | } 1157 | .fa-sort-alpha-desc:before { 1158 | content: "\f15e"; 1159 | } 1160 | .fa-sort-amount-asc:before { 1161 | content: "\f160"; 1162 | } 1163 | .fa-sort-amount-desc:before { 1164 | content: "\f161"; 1165 | } 1166 | .fa-sort-numeric-asc:before { 1167 | content: "\f162"; 1168 | } 1169 | .fa-sort-numeric-desc:before { 1170 | content: "\f163"; 1171 | } 1172 | .fa-thumbs-up:before { 1173 | content: "\f164"; 1174 | } 1175 | .fa-thumbs-down:before { 1176 | content: "\f165"; 1177 | } 1178 | .fa-youtube-square:before { 1179 | content: "\f166"; 1180 | } 1181 | .fa-youtube:before { 1182 | content: "\f167"; 1183 | } 1184 | .fa-xing:before { 1185 | content: "\f168"; 1186 | } 1187 | .fa-xing-square:before { 1188 | content: "\f169"; 1189 | } 1190 | .fa-youtube-play:before { 1191 | content: "\f16a"; 1192 | } 1193 | .fa-dropbox:before { 1194 | content: "\f16b"; 1195 | } 1196 | .fa-stack-overflow:before { 1197 | content: "\f16c"; 1198 | } 1199 | .fa-instagram:before { 1200 | content: "\f16d"; 1201 | } 1202 | .fa-flickr:before { 1203 | content: "\f16e"; 1204 | } 1205 | .fa-adn:before { 1206 | content: "\f170"; 1207 | } 1208 | .fa-bitbucket:before { 1209 | content: "\f171"; 1210 | } 1211 | .fa-bitbucket-square:before { 1212 | content: "\f172"; 1213 | } 1214 | .fa-tumblr:before { 1215 | content: "\f173"; 1216 | } 1217 | .fa-tumblr-square:before { 1218 | content: "\f174"; 1219 | } 1220 | .fa-long-arrow-down:before { 1221 | content: "\f175"; 1222 | } 1223 | .fa-long-arrow-up:before { 1224 | content: "\f176"; 1225 | } 1226 | .fa-long-arrow-left:before { 1227 | content: "\f177"; 1228 | } 1229 | .fa-long-arrow-right:before { 1230 | content: "\f178"; 1231 | } 1232 | .fa-apple:before { 1233 | content: "\f179"; 1234 | } 1235 | .fa-windows:before { 1236 | content: "\f17a"; 1237 | } 1238 | .fa-android:before { 1239 | content: "\f17b"; 1240 | } 1241 | .fa-linux:before { 1242 | content: "\f17c"; 1243 | } 1244 | .fa-dribbble:before { 1245 | content: "\f17d"; 1246 | } 1247 | .fa-skype:before { 1248 | content: "\f17e"; 1249 | } 1250 | .fa-foursquare:before { 1251 | content: "\f180"; 1252 | } 1253 | .fa-trello:before { 1254 | content: "\f181"; 1255 | } 1256 | .fa-female:before { 1257 | content: "\f182"; 1258 | } 1259 | .fa-male:before { 1260 | content: "\f183"; 1261 | } 1262 | .fa-gittip:before { 1263 | content: "\f184"; 1264 | } 1265 | .fa-sun-o:before { 1266 | content: "\f185"; 1267 | } 1268 | .fa-moon-o:before { 1269 | content: "\f186"; 1270 | } 1271 | .fa-archive:before { 1272 | content: "\f187"; 1273 | } 1274 | .fa-bug:before { 1275 | content: "\f188"; 1276 | } 1277 | .fa-vk:before { 1278 | content: "\f189"; 1279 | } 1280 | .fa-weibo:before { 1281 | content: "\f18a"; 1282 | } 1283 | .fa-renren:before { 1284 | content: "\f18b"; 1285 | } 1286 | .fa-pagelines:before { 1287 | content: "\f18c"; 1288 | } 1289 | .fa-stack-exchange:before { 1290 | content: "\f18d"; 1291 | } 1292 | .fa-arrow-circle-o-right:before { 1293 | content: "\f18e"; 1294 | } 1295 | .fa-arrow-circle-o-left:before { 1296 | content: "\f190"; 1297 | } 1298 | .fa-toggle-left:before, 1299 | .fa-caret-square-o-left:before { 1300 | content: "\f191"; 1301 | } 1302 | .fa-dot-circle-o:before { 1303 | content: "\f192"; 1304 | } 1305 | .fa-wheelchair:before { 1306 | content: "\f193"; 1307 | } 1308 | .fa-vimeo-square:before { 1309 | content: "\f194"; 1310 | } 1311 | .fa-turkish-lira:before, 1312 | .fa-try:before { 1313 | content: "\f195"; 1314 | } 1315 | .fa-plus-square-o:before { 1316 | content: "\f196"; 1317 | } 1318 | .fa-space-shuttle:before { 1319 | content: "\f197"; 1320 | } 1321 | .fa-slack:before { 1322 | content: "\f198"; 1323 | } 1324 | .fa-envelope-square:before { 1325 | content: "\f199"; 1326 | } 1327 | .fa-wordpress:before { 1328 | content: "\f19a"; 1329 | } 1330 | .fa-openid:before { 1331 | content: "\f19b"; 1332 | } 1333 | .fa-institution:before, 1334 | .fa-bank:before, 1335 | .fa-university:before { 1336 | content: "\f19c"; 1337 | } 1338 | .fa-mortar-board:before, 1339 | .fa-graduation-cap:before { 1340 | content: "\f19d"; 1341 | } 1342 | .fa-yahoo:before { 1343 | content: "\f19e"; 1344 | } 1345 | .fa-google:before { 1346 | content: "\f1a0"; 1347 | } 1348 | .fa-reddit:before { 1349 | content: "\f1a1"; 1350 | } 1351 | .fa-reddit-square:before { 1352 | content: "\f1a2"; 1353 | } 1354 | .fa-stumbleupon-circle:before { 1355 | content: "\f1a3"; 1356 | } 1357 | .fa-stumbleupon:before { 1358 | content: "\f1a4"; 1359 | } 1360 | .fa-delicious:before { 1361 | content: "\f1a5"; 1362 | } 1363 | .fa-digg:before { 1364 | content: "\f1a6"; 1365 | } 1366 | .fa-pied-piper:before { 1367 | content: "\f1a7"; 1368 | } 1369 | .fa-pied-piper-alt:before { 1370 | content: "\f1a8"; 1371 | } 1372 | .fa-drupal:before { 1373 | content: "\f1a9"; 1374 | } 1375 | .fa-joomla:before { 1376 | content: "\f1aa"; 1377 | } 1378 | .fa-language:before { 1379 | content: "\f1ab"; 1380 | } 1381 | .fa-fax:before { 1382 | content: "\f1ac"; 1383 | } 1384 | .fa-building:before { 1385 | content: "\f1ad"; 1386 | } 1387 | .fa-child:before { 1388 | content: "\f1ae"; 1389 | } 1390 | .fa-paw:before { 1391 | content: "\f1b0"; 1392 | } 1393 | .fa-spoon:before { 1394 | content: "\f1b1"; 1395 | } 1396 | .fa-cube:before { 1397 | content: "\f1b2"; 1398 | } 1399 | .fa-cubes:before { 1400 | content: "\f1b3"; 1401 | } 1402 | .fa-behance:before { 1403 | content: "\f1b4"; 1404 | } 1405 | .fa-behance-square:before { 1406 | content: "\f1b5"; 1407 | } 1408 | .fa-steam:before { 1409 | content: "\f1b6"; 1410 | } 1411 | .fa-steam-square:before { 1412 | content: "\f1b7"; 1413 | } 1414 | .fa-recycle:before { 1415 | content: "\f1b8"; 1416 | } 1417 | .fa-automobile:before, 1418 | .fa-car:before { 1419 | content: "\f1b9"; 1420 | } 1421 | .fa-cab:before, 1422 | .fa-taxi:before { 1423 | content: "\f1ba"; 1424 | } 1425 | .fa-tree:before { 1426 | content: "\f1bb"; 1427 | } 1428 | .fa-spotify:before { 1429 | content: "\f1bc"; 1430 | } 1431 | .fa-deviantart:before { 1432 | content: "\f1bd"; 1433 | } 1434 | .fa-soundcloud:before { 1435 | content: "\f1be"; 1436 | } 1437 | .fa-database:before { 1438 | content: "\f1c0"; 1439 | } 1440 | .fa-file-pdf-o:before { 1441 | content: "\f1c1"; 1442 | } 1443 | .fa-file-word-o:before { 1444 | content: "\f1c2"; 1445 | } 1446 | .fa-file-excel-o:before { 1447 | content: "\f1c3"; 1448 | } 1449 | .fa-file-powerpoint-o:before { 1450 | content: "\f1c4"; 1451 | } 1452 | .fa-file-photo-o:before, 1453 | .fa-file-picture-o:before, 1454 | .fa-file-image-o:before { 1455 | content: "\f1c5"; 1456 | } 1457 | .fa-file-zip-o:before, 1458 | .fa-file-archive-o:before { 1459 | content: "\f1c6"; 1460 | } 1461 | .fa-file-sound-o:before, 1462 | .fa-file-audio-o:before { 1463 | content: "\f1c7"; 1464 | } 1465 | .fa-file-movie-o:before, 1466 | .fa-file-video-o:before { 1467 | content: "\f1c8"; 1468 | } 1469 | .fa-file-code-o:before { 1470 | content: "\f1c9"; 1471 | } 1472 | .fa-vine:before { 1473 | content: "\f1ca"; 1474 | } 1475 | .fa-codepen:before { 1476 | content: "\f1cb"; 1477 | } 1478 | .fa-jsfiddle:before { 1479 | content: "\f1cc"; 1480 | } 1481 | .fa-life-bouy:before, 1482 | .fa-life-buoy:before, 1483 | .fa-life-saver:before, 1484 | .fa-support:before, 1485 | .fa-life-ring:before { 1486 | content: "\f1cd"; 1487 | } 1488 | .fa-circle-o-notch:before { 1489 | content: "\f1ce"; 1490 | } 1491 | .fa-ra:before, 1492 | .fa-rebel:before { 1493 | content: "\f1d0"; 1494 | } 1495 | .fa-ge:before, 1496 | .fa-empire:before { 1497 | content: "\f1d1"; 1498 | } 1499 | .fa-git-square:before { 1500 | content: "\f1d2"; 1501 | } 1502 | .fa-git:before { 1503 | content: "\f1d3"; 1504 | } 1505 | .fa-hacker-news:before { 1506 | content: "\f1d4"; 1507 | } 1508 | .fa-tencent-weibo:before { 1509 | content: "\f1d5"; 1510 | } 1511 | .fa-qq:before { 1512 | content: "\f1d6"; 1513 | } 1514 | .fa-wechat:before, 1515 | .fa-weixin:before { 1516 | content: "\f1d7"; 1517 | } 1518 | .fa-send:before, 1519 | .fa-paper-plane:before { 1520 | content: "\f1d8"; 1521 | } 1522 | .fa-send-o:before, 1523 | .fa-paper-plane-o:before { 1524 | content: "\f1d9"; 1525 | } 1526 | .fa-history:before { 1527 | content: "\f1da"; 1528 | } 1529 | .fa-circle-thin:before { 1530 | content: "\f1db"; 1531 | } 1532 | .fa-header:before { 1533 | content: "\f1dc"; 1534 | } 1535 | .fa-paragraph:before { 1536 | content: "\f1dd"; 1537 | } 1538 | .fa-sliders:before { 1539 | content: "\f1de"; 1540 | } 1541 | .fa-share-alt:before { 1542 | content: "\f1e0"; 1543 | } 1544 | .fa-share-alt-square:before { 1545 | content: "\f1e1"; 1546 | } 1547 | .fa-bomb:before { 1548 | content: "\f1e2"; 1549 | } 1550 | .fa-soccer-ball-o:before, 1551 | .fa-futbol-o:before { 1552 | content: "\f1e3"; 1553 | } 1554 | .fa-tty:before { 1555 | content: "\f1e4"; 1556 | } 1557 | .fa-binoculars:before { 1558 | content: "\f1e5"; 1559 | } 1560 | .fa-plug:before { 1561 | content: "\f1e6"; 1562 | } 1563 | .fa-slideshare:before { 1564 | content: "\f1e7"; 1565 | } 1566 | .fa-twitch:before { 1567 | content: "\f1e8"; 1568 | } 1569 | .fa-yelp:before { 1570 | content: "\f1e9"; 1571 | } 1572 | .fa-newspaper-o:before { 1573 | content: "\f1ea"; 1574 | } 1575 | .fa-wifi:before { 1576 | content: "\f1eb"; 1577 | } 1578 | .fa-calculator:before { 1579 | content: "\f1ec"; 1580 | } 1581 | .fa-paypal:before { 1582 | content: "\f1ed"; 1583 | } 1584 | .fa-google-wallet:before { 1585 | content: "\f1ee"; 1586 | } 1587 | .fa-cc-visa:before { 1588 | content: "\f1f0"; 1589 | } 1590 | .fa-cc-mastercard:before { 1591 | content: "\f1f1"; 1592 | } 1593 | .fa-cc-discover:before { 1594 | content: "\f1f2"; 1595 | } 1596 | .fa-cc-amex:before { 1597 | content: "\f1f3"; 1598 | } 1599 | .fa-cc-paypal:before { 1600 | content: "\f1f4"; 1601 | } 1602 | .fa-cc-stripe:before { 1603 | content: "\f1f5"; 1604 | } 1605 | .fa-bell-slash:before { 1606 | content: "\f1f6"; 1607 | } 1608 | .fa-bell-slash-o:before { 1609 | content: "\f1f7"; 1610 | } 1611 | .fa-trash:before { 1612 | content: "\f1f8"; 1613 | } 1614 | .fa-copyright:before { 1615 | content: "\f1f9"; 1616 | } 1617 | .fa-at:before { 1618 | content: "\f1fa"; 1619 | } 1620 | .fa-eyedropper:before { 1621 | content: "\f1fb"; 1622 | } 1623 | .fa-paint-brush:before { 1624 | content: "\f1fc"; 1625 | } 1626 | .fa-birthday-cake:before { 1627 | content: "\f1fd"; 1628 | } 1629 | .fa-area-chart:before { 1630 | content: "\f1fe"; 1631 | } 1632 | .fa-pie-chart:before { 1633 | content: "\f200"; 1634 | } 1635 | .fa-line-chart:before { 1636 | content: "\f201"; 1637 | } 1638 | .fa-lastfm:before { 1639 | content: "\f202"; 1640 | } 1641 | .fa-lastfm-square:before { 1642 | content: "\f203"; 1643 | } 1644 | .fa-toggle-off:before { 1645 | content: "\f204"; 1646 | } 1647 | .fa-toggle-on:before { 1648 | content: "\f205"; 1649 | } 1650 | .fa-bicycle:before { 1651 | content: "\f206"; 1652 | } 1653 | .fa-bus:before { 1654 | content: "\f207"; 1655 | } 1656 | .fa-ioxhost:before { 1657 | content: "\f208"; 1658 | } 1659 | .fa-angellist:before { 1660 | content: "\f209"; 1661 | } 1662 | .fa-cc:before { 1663 | content: "\f20a"; 1664 | } 1665 | .fa-shekel:before, 1666 | .fa-sheqel:before, 1667 | .fa-ils:before { 1668 | content: "\f20b"; 1669 | } 1670 | .fa-meanpath:before { 1671 | content: "\f20c"; 1672 | } 1673 | -------------------------------------------------------------------------------- /src/assets/libs/font-awesome-4.2.0/css/font-awesome.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} -------------------------------------------------------------------------------- /src/assets/libs/font-awesome-4.2.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/libs/font-awesome-4.2.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/assets/libs/font-awesome-4.2.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/libs/font-awesome-4.2.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/assets/libs/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/libs/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/assets/libs/font-awesome-4.2.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/libs/font-awesome-4.2.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/assets/libs/slimscroll/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flyingflyfly/angular2Demo/9a58b89d875473355282fd5d4f51ef89b741e7a5/src/assets/libs/slimscroll/.DS_Store -------------------------------------------------------------------------------- /src/assets/libs/slimscroll/jquery.slimscroll-1.3.3.min.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2011 Piotr Rochala (http://rocha.la) 2 | * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 3 | * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 4 | * 5 | * Version: 1.3.3 6 | * 7 | */ 8 | (function(e){e.fn.extend({slimScroll:function(g){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function u(d){if(r){d=d||window.event; 9 | var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,e,g){k=!1;var f=d,h=b.outerHeight()-c.outerHeight();e&&(f=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),f=Math.min(Math.max(f,0),h),f=0=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&r||x||y||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var r,x,y,A,z,s,l,B,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+a.railClass); 12 | w();if(e.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else if(!(e.isPlainObject(g)&&"destroy"in g)){a.height="auto"==a.height?b.parent().height():a.height;n=e("
").addClass(a.wrapperClass).css({position:"relative", 13 | overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=e("
").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("
").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible? 14 | "block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)}); 15 | b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});h.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){r=!0;v();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&& 16 | (m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery); -------------------------------------------------------------------------------- /src/assets/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "App", 3 | "icons": [ 4 | { 5 | "src": "/assets/icon/android-icon-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image/png", 8 | "density": 0.75 9 | }, 10 | { 11 | "src": "/assets/icon/android-icon-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image/png", 14 | "density": 1.0 15 | }, 16 | { 17 | "src": "/assets/icon/android-icon-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image/png", 20 | "density": 1.5 21 | }, 22 | { 23 | "src": "/assets/icon/android-icon-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image/png", 26 | "density": 2.0 27 | }, 28 | { 29 | "src": "/assets/icon/android-icon-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image/png", 32 | "density": 3.0 33 | }, 34 | { 35 | "src": "/assets/icon/android-icon-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image/png", 38 | "density": 4.0 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /src/assets/mock-data/mock-data.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"res": "data"} 3 | ] 4 | -------------------------------------------------------------------------------- /src/assets/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /src/assets/service-worker.js: -------------------------------------------------------------------------------- 1 | // This file is intentionally without code. 2 | -------------------------------------------------------------------------------- /src/custom-typings.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Custom Type Definitions 3 | * When including 3rd party modules you also need to include the type definition for the module 4 | * if they don't provide one within the module. You can try to install it with @types 5 | 6 | npm install @types/node 7 | npm install @types/lodash 8 | 9 | * If you can't find the type definition in the registry we can make an ambient/global definition in 10 | * this file for now. For example 11 | 12 | declare module 'my-module' { 13 | export function doesSomething(value: string): string; 14 | } 15 | 16 | * If you are using a CommonJS module that is using module.exports then you will have to write your 17 | * types using export = yourObjectOrFunction with a namespace above it 18 | * notice how we have to create a namespace that is equal to the function we're 19 | * assigning the export to 20 | 21 | declare module 'jwt-decode' { 22 | function jwtDecode(token: string): any; 23 | namespace jwtDecode {} 24 | export = jwtDecode; 25 | } 26 | 27 | * 28 | * If you're prototying and you will fix the types later you can also declare it as type any 29 | * 30 | 31 | declare var assert: any; 32 | declare var _: any; 33 | declare var $: any; 34 | 35 | * 36 | * If you're importing a module that uses Node.js modules which are CommonJS you need to import as 37 | * in the files such as main.browser.ts or any file within app/ 38 | * 39 | 40 | import * as _ from 'lodash' 41 | 42 | * You can include your type definitions in this file until you create one for the @types 43 | * 44 | */ 45 | 46 | // support NodeJS modules without type definitions 47 | declare module '*'; 48 | 49 | // Extra variables that live on Global that will be replaced by webpack DefinePlugin 50 | declare var ENV: string; 51 | declare var HMR: boolean; 52 | declare var System: SystemJS; 53 | 54 | interface SystemJS { 55 | import: (path?: string) => Promise; 56 | } 57 | 58 | interface GlobalEnvironment { 59 | ENV: string; 60 | HMR: boolean; 61 | SystemJS: SystemJS; 62 | System: SystemJS; 63 | } 64 | 65 | interface Es6PromiseLoader { 66 | (id: string): (exportName?: string) => Promise; 67 | } 68 | 69 | type FactoryEs6PromiseLoader = () => Es6PromiseLoader; 70 | type FactoryPromise = () => Promise; 71 | 72 | type AsyncRoutes = { 73 | [component: string]: Es6PromiseLoader | 74 | Function | 75 | FactoryEs6PromiseLoader | 76 | FactoryPromise 77 | }; 78 | 79 | 80 | type IdleCallbacks = Es6PromiseLoader | 81 | Function | 82 | FactoryEs6PromiseLoader | 83 | FactoryPromise ; 84 | 85 | interface WebpackModule { 86 | hot: { 87 | data?: any, 88 | idle: any, 89 | accept(dependencies?: string | string[], callback?: (updatedDependencies?: any) => void): void; 90 | decline(deps?: any | string | string[]): void; 91 | dispose(callback?: (data?: any) => void): void; 92 | addDisposeHandler(callback?: (data?: any) => void): void; 93 | removeDisposeHandler(callback?: (data?: any) => void): void; 94 | check(autoApply?: any, callback?: (err?: Error, outdatedModules?: any[]) => void): void; 95 | apply(options?: any, callback?: (err?: Error, outdatedModules?: any[]) => void): void; 96 | status(callback?: (status?: string) => void): void | string; 97 | removeStatusHandler(callback?: (status?: string) => void): void; 98 | }; 99 | } 100 | 101 | 102 | interface WebpackRequire { 103 | (id: string): any; 104 | (paths: string[], callback: (...modules: any[]) => void): void; 105 | ensure(ids: string[], callback: (req: WebpackRequire) => void, chunkName?: string): void; 106 | context(directory: string, useSubDirectories?: boolean, regExp?: RegExp): WebpackContext; 107 | } 108 | 109 | interface WebpackContext extends WebpackRequire { 110 | keys(): string[]; 111 | } 112 | 113 | interface ErrorStackTraceLimit { 114 | stackTraceLimit: number; 115 | } 116 | 117 | 118 | // Extend typings 119 | interface NodeRequire extends WebpackRequire {} 120 | interface ErrorConstructor extends ErrorStackTraceLimit {} 121 | interface NodeRequireFunction extends Es6PromiseLoader {} 122 | interface NodeModule extends WebpackModule {} 123 | interface Global extends GlobalEnvironment {} 124 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= webpackConfig.metadata.title %> 9 | 10 | 11 | 12 | 13 | 14 | <% if (webpackConfig.htmlElements.headTags) { %> 15 | 16 | <%= webpackConfig.htmlElements.headTags %> 17 | <% } %> 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Loading... 29 | 30 | 31 | <% if (webpackConfig.metadata.isDevServer && webpackConfig.metadata.HMR !== true) { %> 32 | 33 | 34 | <% } %> 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/main.browser.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Angular bootstraping 3 | */ 4 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 5 | import { decorateModuleRef } from './app/environment'; 6 | import { bootloader } from '@angularclass/hmr'; 7 | /* 8 | * App Module 9 | * our top level module that holds all of our components 10 | */ 11 | import { AppModule } from './app'; 12 | 13 | /* 14 | * Bootstrap our Angular app with a top level NgModule 15 | */ 16 | export function main(): Promise { 17 | return platformBrowserDynamic() 18 | .bootstrapModule(AppModule) 19 | .then(decorateModuleRef) 20 | .catch(err => console.error(err)); 21 | } 22 | 23 | // needed for hmr 24 | // in prod this is replace for document ready 25 | bootloader(main); 26 | -------------------------------------------------------------------------------- /src/polyfills.browser.ts: -------------------------------------------------------------------------------- 1 | // TODO(gdi2290): switch to DLLs 2 | 3 | // Polyfills 4 | 5 | // import 'ie-shim'; // Internet Explorer 9 support 6 | 7 | 8 | // import 'core-js/es6'; 9 | // Added parts of es6 which are necessary for your project or your browser support requirements. 10 | import 'core-js/es6/symbol'; 11 | import 'core-js/es6/object'; 12 | import 'core-js/es6/function'; 13 | import 'core-js/es6/parse-int'; 14 | import 'core-js/es6/parse-float'; 15 | import 'core-js/es6/number'; 16 | import 'core-js/es6/math'; 17 | import 'core-js/es6/string'; 18 | import 'core-js/es6/date'; 19 | import 'core-js/es6/array'; 20 | import 'core-js/es6/regexp'; 21 | import 'core-js/es6/map'; 22 | import 'core-js/es6/set'; 23 | import 'core-js/es6/weak-map'; 24 | import 'core-js/es6/weak-set'; 25 | import 'core-js/es6/typed'; 26 | import 'core-js/es6/reflect'; 27 | // see issue https://github.com/AngularClass/angular2-webpack-starter/issues/709 28 | // import 'core-js/es6/promise'; 29 | 30 | import 'core-js/es7/reflect'; 31 | import 'zone.js/dist/zone'; 32 | 33 | // Typescript emit helpers polyfill 34 | import 'ts-helpers'; 35 | 36 | if ('production' === ENV) { 37 | // Production 38 | 39 | 40 | } else { 41 | // Development 42 | 43 | Error.stackTraceLimit = Infinity; 44 | 45 | require('zone.js/dist/long-stack-trace-zone'); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/vendor.browser.ts: -------------------------------------------------------------------------------- 1 | // For vendors for example jQuery, Lodash, angular2-jwt just import them here unless you plan on 2 | // chunking vendors files for async loading. You would need to import the async loaded vendors 3 | // at the entry point of the async loaded file. Also see custom-typings.d.ts as you also need to 4 | // run `typings install x` where `x` is your module 5 | import 'jquery'; 6 | import './assets/libs/slimscroll/jquery.slimscroll-1.3.3.min.js'; 7 | // TODO(gdi2290): switch to DLLs 8 | 9 | // Angular 2 10 | import '@angular/platform-browser'; 11 | import '@angular/platform-browser-dynamic'; 12 | import '@angular/core'; 13 | import '@angular/common'; 14 | import '@angular/forms'; 15 | import '@angular/http'; 16 | import '@angular/router'; 17 | 18 | // AngularClass 19 | import '@angularclass/hmr'; 20 | 21 | // RxJS 22 | import 'rxjs/add/operator/map'; 23 | import 'rxjs/add/operator/mergeMap'; 24 | 25 | if ('production' === ENV) { 26 | // Production 27 | 28 | 29 | } else { 30 | // Development 31 | 32 | } 33 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true, 8 | "allowSyntheticDefaultImports": true, 9 | "sourceMap": true, 10 | "noEmitHelpers": true, 11 | "strictNullChecks": false, 12 | "baseUrl": "./src", 13 | "paths": [ 14 | ], 15 | "lib": [ 16 | "dom", 17 | "es6" 18 | ], 19 | "types": [ 20 | "hammerjs", 21 | "jasmine", 22 | "node", 23 | "protractor", 24 | "selenium-webdriver", 25 | "source-map" 26 | ] 27 | }, 28 | "exclude": [ 29 | "node_modules", 30 | "dist" 31 | ], 32 | "awesomeTypescriptLoaderOptions": { 33 | "forkChecker": true, 34 | "useWebpackText": true 35 | }, 36 | "compileOnSave": false, 37 | "buildOnSave": false, 38 | "atom": { "rewriteTsconfig": false } 39 | } 40 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/codelyzer" 4 | ], 5 | "rules": { 6 | "member-access": false, 7 | "member-ordering": [ 8 | true, 9 | "public-before-private", 10 | "static-before-instance", 11 | "variables-before-functions" 12 | ], 13 | "no-any": false, 14 | "no-inferrable-types": false, 15 | "no-internal-module": true, 16 | "no-var-requires": false, 17 | "typedef": false, 18 | "typedef-whitespace": [ 19 | true, 20 | { 21 | "call-signature": "nospace", 22 | "index-signature": "nospace", 23 | "parameter": "nospace", 24 | "property-declaration": "nospace", 25 | "variable-declaration": "nospace" 26 | }, 27 | { 28 | "call-signature": "space", 29 | "index-signature": "space", 30 | "parameter": "space", 31 | "property-declaration": "space", 32 | "variable-declaration": "space" 33 | } 34 | ], 35 | 36 | "ban": false, 37 | "curly": false, 38 | "forin": true, 39 | "label-position": true, 40 | "label-undefined": true, 41 | "no-arg": true, 42 | "no-bitwise": true, 43 | "no-conditional-assignment": true, 44 | "no-console": [ 45 | true, 46 | "debug", 47 | "info", 48 | "time", 49 | "timeEnd", 50 | "trace" 51 | ], 52 | "no-construct": true, 53 | "no-debugger": true, 54 | "no-duplicate-key": true, 55 | "no-duplicate-variable": true, 56 | "no-empty": false, 57 | "no-eval": true, 58 | "no-null-keyword": false, 59 | "no-shadowed-variable": true, 60 | "no-string-literal": false, 61 | "no-switch-case-fall-through": true, 62 | "no-unreachable": true, 63 | "no-unused-expression": true, 64 | "no-unused-variable": false, 65 | "no-use-before-declare": true, 66 | "no-var-keyword": true, 67 | "radix": true, 68 | "switch-default": true, 69 | "triple-equals": [ 70 | true, 71 | "allow-null-check" 72 | ], 73 | "use-strict": [ 74 | true, 75 | "check-module" 76 | ], 77 | 78 | "eofline": true, 79 | "indent": [ 80 | true, 81 | "spaces" 82 | ], 83 | "max-line-length": [ 84 | true, 85 | 100 86 | ], 87 | "no-require-imports": false, 88 | "no-trailing-whitespace": true, 89 | "object-literal-sort-keys": false, 90 | "trailing-comma": [ 91 | true, 92 | { 93 | "multiline": false, 94 | "singleline": "never" 95 | } 96 | ], 97 | 98 | "align": false, 99 | "class-name": true, 100 | "comment-format": [ 101 | true, 102 | "check-space" 103 | ], 104 | "interface-name": false, 105 | "jsdoc-format": true, 106 | "no-consecutive-blank-lines": false, 107 | "no-constructor-vars": false, 108 | "one-line": [ 109 | true, 110 | "check-open-brace", 111 | "check-catch", 112 | "check-else", 113 | "check-finally", 114 | "check-whitespace" 115 | ], 116 | "quotemark": [ 117 | true, 118 | "single", 119 | "avoid-escape" 120 | ], 121 | "semicolon": [true, "always"], 122 | "variable-name": [ 123 | true, 124 | "check-format", 125 | "allow-leading-underscore", 126 | "ban-keywords" 127 | ], 128 | "whitespace": [ 129 | true, 130 | "check-branch", 131 | "check-decl", 132 | "check-operator", 133 | "check-separator", 134 | "check-type" 135 | ], 136 | "import-destructuring-spacing": true 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "mode": "modules", 3 | "out": "doc", 4 | "theme": "default", 5 | "ignoreCompilerErrors": "true", 6 | "experimentalDecorators": "true", 7 | "emitDecoratorMetadata": "true", 8 | "target": "ES5", 9 | "moduleResolution": "node", 10 | "preserveConstEnums": "true", 11 | "stripInternal": "true", 12 | "suppressExcessPropertyErrors": "true", 13 | "suppressImplicitAnyIndexErrors": "true", 14 | "module": "commonjs" 15 | } 16 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: @AngularClass 3 | */ 4 | 5 | // Look in ./config folder for webpack.dev.js 6 | switch (process.env.NODE_ENV) { 7 | case 'prod': 8 | case 'production': 9 | module.exports = require('./config/webpack.prod')({env: 'production'}); 10 | break; 11 | case 'test': 12 | case 'testing': 13 | module.exports = require('./config/webpack.test')({env: 'test'}); 14 | break; 15 | case 'dev': 16 | case 'development': 17 | default: 18 | module.exports = require('./config/webpack.dev')({env: 'development'}); 19 | } 20 | --------------------------------------------------------------------------------