Skip to content

Commit 487c759

Browse files
committed
github pages
1 parent 33d3408 commit 487c759

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docs/example.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ window.angular.module('exampleApp', [
1212

1313
return {
1414
restrict: 'C',
15+
scope: {
16+
notificationText: '='
17+
},
1518
link: function (scope, element) {
1619
element.on('click', function onClick() {
1720
webNotification.showNotification('Example Notification', {
18-
body: scope.text,
21+
body: scope.notificationText,
1922
icon: 'https://rawgit.com/sagiegurari/angular-web-notification/master/alert.ico',
2023
onClick: function onNotificationClicked() {
2124
console.log('Notification clicked.');

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<form class="notification-form" ng-controller="exampleForm">
1717
<div class="form-group">
1818
<label for="message">Notification Text</label>
19-
<input type="text" class="form-control" id="message" placeholder="Notification Text">
19+
<input type="text" class="form-control" id="message" placeholder="Notification Text" ng-model="text">
2020
</div>
21-
<button class="show-button btn btn-primary">Show Notification</button>
21+
<button class="show-button btn btn-primary" notification-text="text">Show Notification</button>
2222
</form>
2323
</body>
2424

0 commit comments

Comments
 (0)