Skip to content

Commit 34704a7

Browse files
authored
Merge pull request sstorie#24 from jhillhouse92/master
Updated to be compatible with angular4 for angular2-animated-notifications-panel
2 parents 8d30e91 + 9ced45e commit 34704a7

File tree

6 files changed

+26
-14
lines changed

6 files changed

+26
-14
lines changed

angular2-animated-notifications-panel/app/app.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {NotificationPanelComponent} from "./notification-panel/index";
66
@Component({
77
selector: 'my-app',
88
moduleId: module.id,
9-
directives: [NotificationPanelComponent],
109
templateUrl: "app.component.html",
1110
styleUrls: ['app.component.css']
1211
})
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { NgModule } from '@angular/core';
2+
import { BrowserModule } from '@angular/platform-browser';
3+
import { AppComponent } from './app.component';
4+
import { NotificationComponent} from './notification/notification.component';
5+
import { NotificationPanelComponent } from './notification-panel/notification-panel.component';
6+
import { NotificationService } from './shared/notification.service';
7+
8+
@NgModule({
9+
imports: [ BrowserModule ],
10+
declarations: [ AppComponent, NotificationComponent, NotificationPanelComponent ],
11+
bootstrap: [ AppComponent ],
12+
providers: [ NotificationService ]
13+
})
14+
export class AppModule { }
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { bootstrap } from '@angular/platform-browser-dynamic';
1+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
22

33
import {NotificationService} from "./shared/index";
4-
import {AppComponent} from './app.component';
4+
import {AppModule} from './app.module';
55

66

7-
bootstrap(AppComponent, [
7+
platformBrowserDynamic().bootstrapModule(AppModule, [
88
NotificationService
99
]);
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<div class="container" @panelWidthTrigger="expandedState">
2-
<div class="title" @titleColorTrigger="expandedState">
3-
<span *ngIf="expanded" @titleTextTrigger="'in'">Notifications</span>
1+
<div class="container" [@panelWidthTrigger]="expandedState">
2+
<div class="title" [@titleColorTrigger]="expandedState">
3+
<span *ngIf="expanded" [@titleTextTrigger]="'in'">Notifications</span>
44
<a class="link" (click)="toggleExpandedState()">
5-
<i @iconTrigger="expandedState" class="fa fa-arrow-circle-left" aria-hidden="true"></i>
5+
<i [@iconTrigger]="expandedState" class="fa fa-arrow-circle-left" aria-hidden="true"></i>
66
</a>
77
</div>
88

@@ -11,4 +11,4 @@
1111
[notification]="n"
1212
[expanded]="expanded"></notification>
1313
</div>
14-
</div>
14+
</div>

angular2-animated-notifications-panel/app/notification-panel/notification-panel.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {NotificationComponent} from "../notification/index";
1616
@Component({
1717
moduleId: module.id,
1818
selector: 'notification-panel',
19-
directives: [NotificationComponent],
2019
templateUrl: 'notification-panel.component.html',
2120
styleUrls: ['notification-panel.component.css'],
2221
animations: [
@@ -113,4 +112,4 @@ export class NotificationPanelComponent implements OnInit, OnDestroy {
113112
this.expanded = !this.expanded;
114113
}
115114

116-
}
115+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<div class="icon" @visibleTrigger="'visible'" [ngSwitch]="notification.type">
1+
<div class="icon" [@visibleTrigger]="'visible'" [ngSwitch]="notification.type">
22
<i *ngSwitchCase="0" class="fa fa-comment"></i>
33
<i *ngSwitchCase="1" class="fa fa-exclamation-triangle"></i>
44
<i *ngSwitchCase="2" class="fa fa-code"></i>
55
<i *ngSwitchCase="3" class="fa fa-credit-card"></i>
66
</div>
7-
<div *ngIf="expanded" @visibleTrigger="'visible'" class="details">
7+
<div *ngIf="expanded" [@visibleTrigger]="'visible'" class="details">
88
<div class="message">
99
<span>{{notification.message}}</span>
1010
</div>
1111
<div class="date">
1212
<span>{{notification.date | date:'mediumTime'}}</span>
1313
</div>
14-
</div>
14+
</div>

0 commit comments

Comments
 (0)