diff --git a/.editorconfig b/.editorconfig
index 802ae913..4c576f3d 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -16,9 +16,9 @@ charset = utf-8
# 4 space indentation
[*.{js,css,scss,html}]
indent_style = space
-indent_size = 2
+indent_size = 4
# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml,bower.json}]
indent_style = space
-indent_size = 2
+indent_size = 4
diff --git a/README.md b/README.md
index b28f22dc..d438c258 100644
--- a/README.md
+++ b/README.md
@@ -1,33 +1,32 @@
-# angular2-webpack
+>Based on the great [angular2-webpack](https://github.com/preboot/angular2-webpack)
-[](https://david-dm.org/preboot/angular2-webpack#info=dependencies) [](https://david-dm.org/preboot/angular2-webpack#info=devDependencies)
+# angular-typescript-webpack
-**Note: This guide is following the Angular's [Style Guide](http://angular.io/styleguide) so I will be changing conventions here and there eventually. You are free to use your own conventions with this starter.**
+A complete, yet simple, starter for Angular (**not 2**) with TypeScript using Webpack (including Bootstrap).
-A complete, yet simple, starter for Angular 2 using Webpack.
+This seed repo serves as an Angular starter for anyone looking to get up and running
+with Angular and TypeScript fast. Using [Webpack](http://webpack.github.io/) for building
+our files and assisting with boilerplate. We're also using Protractor for our end-to-end story
+and Karma for our unit tests. By default, [Bootstrap](http://getbootstrap.com) is also included.
-This seed repo serves as an Angular 2 starter for anyone looking to get up and running with Angular 2 and TypeScript fast. Using [Webpack](http://webpack.github.io/) for building our files and assisting with boilerplate. We're also using Protractor for our end-to-end story and Karma for our unit tests.
-* Best practices in file and application organization for [Angular 2](https://angular.io/).
+* Best practices in file and application organization for [Angular](https://angularjs.org/).
* Ready to go build system using [Webpack](https://webpack.github.io/docs/) for working with [TypeScript](http://www.typescriptlang.org/).
-* Easily add new components using [Angular 2 cli](https://github.com/angular/angular-cli).
-* Testing Angular 2 code with [Jasmine](http://jasmine.github.io/) and [Karma](http://karma-runner.github.io/).
+* Testing Angular code with [Jasmine](http://jasmine.github.io/) and [Karma](http://karma-runner.github.io/).
* Coverage with [Istanbul](https://github.com/gotwarlost/istanbul)
-* End-to-end Angular 2 code using [Protractor](https://angular.github.io/protractor/).
+* End-to-end Angular code using [Protractor](https://angular.github.io/protractor/).
* Stylesheets with [SASS](http://sass-lang.com/) (not required, it supports regular css too).
* Error reported with [TSLint](http://palantir.github.io/tslint/) and [Codelyzer](https://github.com/mgechev/codelyzer).
* Documentation with [TypeDoc](http://typedoc.io/).
>Warning: Make sure you're using the latest version of Node.js and NPM
-[Is Angular 2 Ready Yet?](http://splintercode.github.io/is-angular-2-ready/)
-
### Quick start
> Clone/Download the repo then edit `app.ts` inside [`/src/app/app.component.ts`](/src/app/app.component.ts)
```bash
# clone our repo
-$ git clone https://github.com/preboot/angular2-webpack.git my-app
+$ git clone https://github.com/rose-m/angular-typescript-webpack.git my-app
# change directory to your app
$ cd my-app
@@ -75,7 +74,8 @@ After you have installed all dependencies you can now run the app with:
npm start
```
-It will start a local server using `webpack-dev-server` which will watch, build (in-memory), and reload for you. The port will be displayed to you as `http://localhost:8080`.
+It will start a local server using `webpack-dev-server` which will watch, build (in-memory),
+and reload for you. The port will be displayed to you as `http://localhost:8080`.
## Developing
@@ -115,23 +115,15 @@ npm run docs
No, Webpack will add all the needed Javascript bundles as script tags and all the CSS files as link tags. The advantage is that you don't need to modify the index.html every time you build your solution to update the hashes.
-#### How to include external angular 2 libraries ?
+#### How to include external libraries ?
-It's simple, just install the lib via npm and import it in your code when you need it. Don't forget that you need to configure some external libs in the [bootstrap](https://github.com/preboot/angular2-webpack/blob/master/src/bootstrap.ts) of your application.
+It's simple, just install the lib via npm and import it in your code when you need it.
+Don't forget that you need to reference some external libs in the
+[bootstrap](https://github.com/preboot/angular-typescript-webpack/blob/master/src/app/index.ts) of your application.
### How to include external css files such as bootstrap.css ?
-Just install the lib and import the css files in [vendor.ts](https://github.com/preboot/angular2-webpack/blob/master/src/vendor.ts). For example this is how to do it with bootstrap:
-
-```sh
-npm install bootstrap@4.0.0 --save
-```
-
-And in [vendor.ts](https://github.com/preboot/angular2-webpack/blob/master/src/vendor.ts) add the following:
-
-```ts
-import 'bootstrap/dist/css/bootstrap.css';
-```
+Just install the lib and import the css files in [vendor.ts](https://github.com/rose-m/angular-typescript-webpack/blob/master/src/vendor.ts).
# TypeScript
diff --git a/karma-shim.js b/karma-shim.js
index 6ae04adc..e200097e 100644
--- a/karma-shim.js
+++ b/karma-shim.js
@@ -1,14 +1,9 @@
Error.stackTraceLimit = Infinity;
require('es6-shim');
-require('reflect-metadata');
-
-require('ts-helpers');
-
-require('zone.js/dist/zone');
-require('zone.js/dist/long-stack-trace-zone');
-require('zone.js/dist/jasmine-patch');
-require('zone.js/dist/async-test');
+require('angular');
+require('angular-mocks');
+require('angular-ui-router/release/angular-ui-router');
/*
Ok, this is kinda crazy. We can use the the context method on
@@ -25,11 +20,3 @@ var appContext = require.context('./src', true, /\.spec\.ts/);
// that will require the file and load it up here. Context will
// loop and require those spec files here
appContext.keys().forEach(appContext);
-
-// Select BrowserDomAdapter.
-// see https://github.com/AngularClass/angular2-webpack-starter/issues/124
-// Somewhere in the test setup
-var testing = require('@angular/core/testing');
-var browser = require('@angular/platform-browser-dynamic/testing');
-
-testing.setBaseTestProviders(browser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, browser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
diff --git a/package.json b/package.json
index 748a1e55..82bd73db 100644
--- a/package.json
+++ b/package.json
@@ -23,19 +23,14 @@
"postinstall": "npm run webdriver-update && typings install"
},
"dependencies": {
- "@angular/common": "2.0.0-rc.1",
- "@angular/compiler": "2.0.0-rc.1",
- "@angular/core": "2.0.0-rc.1",
- "@angular/http": "2.0.0-rc.1",
- "@angular/platform-browser": "2.0.0-rc.1",
- "@angular/platform-browser-dynamic": "2.0.0-rc.1",
- "@angular/router-deprecated": "2.0.0-rc.1",
+ "angular": "^1.5.5",
+ "angular-ui-router": "^0.3.0",
+ "bootstrap-sass": "^3.3.6",
"es6-shim": "^0.35.0",
- "reflect-metadata": "0.1.2",
- "rxjs": "5.0.0-beta.6",
- "zone.js": "0.6.12"
+ "jquery": "^2.2.3"
},
"devDependencies": {
+ "angular-mocks": "^1.5.5",
"autoprefixer": "^6.3.2",
"codelyzer": "0.0.19",
"copy-webpack-plugin": "^2.1.3",
diff --git a/protractor.conf.js b/protractor.conf.js
index 12b68e5d..8f38fc0b 100644
--- a/protractor.conf.js
+++ b/protractor.conf.js
@@ -30,14 +30,6 @@ exports.config = {
browser.ignoreSynchronization = true;
},
-
-
- /**
- * Angular 2 configuration
- *
- * useAllAngular2AppRoots: tells Protractor to wait for any angular2 apps on the page instead of just the one matching
- * `rootEl`
- *
- */
- useAllAngular2AppRoots: true
+
+ waitForAngular: true
};
diff --git a/src/app/about/about.component.html b/src/app/about/about.component.html
deleted file mode 100644
index 7dc59929..00000000
--- a/src/app/about/about.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- About Works!
-
diff --git a/src/app/about/about.component.scss b/src/app/about/about.component.scss
deleted file mode 100644
index b3afa74c..00000000
--- a/src/app/about/about.component.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-* {
- color: #f87c08;
-}
diff --git a/src/app/about/about.component.spec.ts b/src/app/about/about.component.spec.ts
deleted file mode 100644
index ffcb5ef0..00000000
--- a/src/app/about/about.component.spec.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import {
- it,
- describe,
- async,
- inject,
- beforeEachProviders
-} from '@angular/core/testing';
-
-import { TestComponentBuilder } from '@angular/compiler/testing';
-
-import { AboutComponent } from './about.component';
-
-describe('About Component', () => {
-
- beforeEachProviders(() => []);
-
- it('should ...', async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
- tcb.createAsync(AboutComponent).then((fixture) => {
- fixture.detectChanges();
- });
- })));
-
-});
diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts
deleted file mode 100644
index 85dab66a..00000000
--- a/src/app/about/about.component.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'my-about',
- template: require('./about.component.html'),
- styles: [require('./about.component.scss')]
-})
-export class AboutComponent implements OnInit {
-
- constructor() {
- // Do stuff
- }
-
- ngOnInit() {
- console.log('Hello About');
- }
-
-}
diff --git a/src/app/about/index.ts b/src/app/about/index.ts
deleted file mode 100644
index b7cb92ae..00000000
--- a/src/app/about/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './about.component';
diff --git a/src/app/app.component.e2e-spec.js b/src/app/app.component.e2e-spec.js
index 92a7004d..df6dddd3 100644
--- a/src/app/app.component.e2e-spec.js
+++ b/src/app/app.component.e2e-spec.js
@@ -1,27 +1,27 @@
describe('App', function () {
- beforeEach(function () {
- browser.get('/');
- });
+ beforeEach(function () {
+ browser.get('/');
+ });
- it('should have a title', function () {
- expect(browser.getTitle()).toEqual("Angular 2 App | ng2-webpack");
- });
+ it('should have a title', function () {
+ expect(browser.getTitle()).toEqual("Angular TypeScript App");
+ });
- it('should have ', function () {
- expect(element(by.css('my-app header')).isPresent()).toEqual(true);
- });
+ it('should have ', function () {
+ expect(element(by.css('app header')).isPresent()).toEqual(true);
+ });
- it('should have ', function () {
- expect(element(by.css('my-app main')).isPresent()).toEqual(true);
- });
+ it('should have ', function () {
+ expect(element(by.css('app main')).isPresent()).toEqual(true);
+ });
- it('should have a main title', function () {
- expect(element(by.css('main .title')).getText()).toEqual('Hello from Angular 2 !');
- });
+ it('should have a main title', function () {
+ expect(element(by.css('main .title')).getText()).toEqual('Hello from Starter!');
+ });
- it('should have