Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
45 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Component } from '@angular/core'; | ||
import template from "./app.html"; | ||
|
||
@Component({ | ||
selector: 'my-app', | ||
template | ||
}) | ||
export class MyApp {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
My App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { NgModule, ErrorHandler } from '@angular/core'; | ||
import { MyApp } from './app.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
MyApp | ||
], | ||
entryComponents: [ | ||
MyApp | ||
], | ||
providers: [ | ||
{ provide: ErrorHandler } | ||
] | ||
}) | ||
export class AppModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// App Global Sass | ||
// -------------------------------------------------- | ||
// Put style rules here that you want to apply globally. These | ||
// styles are for the entire app and not just one component. | ||
// Additionally, this file can be also used as an entry point | ||
// to import other Sass files to be included in the output CSS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/* CSS declarations go here */ | ||
// App | ||
@import "imports/app/app"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,10 @@ | ||
import { Template } from 'meteor/templating'; | ||
import { ReactiveVar } from 'meteor/reactive-var'; | ||
import 'zone.js'; | ||
import 'reflect-metadata'; | ||
|
||
import './main.html'; | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
import { Meteor } from 'meteor/meteor'; | ||
import { AppModule } from './imports/app/app.module'; | ||
|
||
Template.hello.onCreated(function helloOnCreated() { | ||
// counter starts at 0 | ||
this.counter = new ReactiveVar(0); | ||
}); | ||
|
||
Template.hello.helpers({ | ||
counter() { | ||
return Template.instance().counter.get(); | ||
}, | ||
}); | ||
|
||
Template.hello.events({ | ||
'click button'(event, instance) { | ||
// increment the counter when button is clicked | ||
instance.counter.set(instance.counter.get() + 1); | ||
}, | ||
Meteor.startup(() => { | ||
platformBrowserDynamic().bootstrapModule(AppModule); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
/* | ||
A wildcard module is declared below to allow third party libraries to be used in an app even if they don't | ||
provide their own type declarations. | ||
*/ | ||
declare module '*'; |