Skip to content

Commit

Permalink
components folder with html and css
Browse files Browse the repository at this point in the history
  • Loading branch information
vladotesanovic committed Feb 22, 2016
1 parent a4f0392 commit 63b2548
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 64 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
app/**/*.js
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/*.js": {"when": "$(basename).ts"},
"**/*.js.map": {"when": "$(basename).ts"}
}
}
1 change: 1 addition & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var app = express();

// expose node_modules to client app
app.use(express.static("./node_modules/"));
app.use(express.static("./app/"));

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
Expand Down
6 changes: 0 additions & 6 deletions app/app.component.ts

This file was deleted.

5 changes: 5 additions & 0 deletions app/components/app.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
h1 {
color: white;
background: darkred;
padding: 20px;
}
1 change: 1 addition & 0 deletions app/components/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>My First {{name}} app</h1>
9 changes: 9 additions & 0 deletions app/components/app.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {Component} from 'angular2/core';
@Component({
selector: 'my-app',
templateUrl: 'components/app.component.html',
styleUrls: ['components/app.component.css']
})
export class AppComponent {
name: string = "Angular 2";
}
2 changes: 1 addition & 1 deletion app/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {bootstrap} from 'angular2/platform/browser'
import {AppComponent} from './app.component'
import {AppComponent} from './components/app.component'

bootstrap(AppComponent);
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
}
});
System.import('javascripts/app/main')
System.import('main')
.then(null, console.error.bind(console));
</script>

Expand Down
35 changes: 0 additions & 35 deletions public/javascripts/app/app.component.js

This file was deleted.

1 change: 0 additions & 1 deletion public/javascripts/app/app.component.js.map

This file was deleted.

16 changes: 0 additions & 16 deletions public/javascripts/app/main.js

This file was deleted.

1 change: 0 additions & 1 deletion public/javascripts/app/main.js.map

This file was deleted.

6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"target": "es5",
"module": "system",
"rootDir": "app",
"outDir": "public/javascripts/app",
"outDir": "app",
"moduleResolution": "node",
"sourceMap": true,
"sourceMap": false,
"inlineSources": true,
"inlineSourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
Expand Down

0 comments on commit 63b2548

Please sign in to comment.