This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Anyone can add global options. Fixed indentation and added tests. This …
…closes #26
- Loading branch information
Milos Bejda
committed
May 11, 2015
1 parent
c067ca9
commit e245a8f
Showing
3 changed files
with
88 additions
and
3 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
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,44 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="components/angular/angular.js"></script> | ||
<script src="components/angular-route/angular-route.js"></script> | ||
<script src="message-center.js"></script> | ||
<script> | ||
angular.module('messageCenter.e2e', ['MessageCenterModule', 'ngRoute']) | ||
.config(function($routeProvider,$messageCenterServiceProvider) { | ||
$messageCenterServiceProvider.setGlobalOptions({ | ||
timeout:1000 | ||
}); | ||
$routeProvider | ||
.when('/', { templateUrl: 'home' }) | ||
.when('/edit', { templateUrl: 'edit' }) | ||
}) | ||
|
||
.controller('HomeController', function($scope, $location, messageCenterService) { | ||
$scope.goIndex = function() { | ||
$location.path('/'); | ||
}; | ||
|
||
$scope.goEditSuccess = function() { | ||
messageCenterService.add('success', 'You have reached the edit page!'); | ||
|
||
}; | ||
}) | ||
</script> | ||
</head> | ||
|
||
<body data-ng-app="messageCenter.e2e"> | ||
<script type="text/ng-template" id="home"> | ||
<article data-ng-controller="HomeController" > | ||
<div mc-messages></div> | ||
<h1>Home</h1> | ||
<button id="goEditSuccess" data-ng-click="goEditSuccess()">Edit (success)</button> | ||
</article> | ||
</script> | ||
|
||
|
||
|
||
<article data-ng-view /> | ||
</body> | ||
</html> |
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