-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Controllers do not talk to model persistance layer directly anymore. This is hidden to internals of appManager. The reason for such solution is the persistance store can change in the future, leaving controllers untouched.
- Loading branch information
Showing
9 changed files
with
81 additions
and
47 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 |
---|---|---|
@@ -1 +1 @@ | ||
//redirect to signin module | ||
//server redirect to signin module |
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,18 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html lang="en" ng-app="home"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
</head> | ||
<body> | ||
<div> | ||
<p>TODO...</p> | ||
<div ng-controller="homeController"> | ||
<h3>Home View</h3> | ||
<div ui-view> | ||
</div> | ||
</div> | ||
</div> | ||
<script src="/js/lib/angular/angular.min.js"></script> | ||
<script src="/js/lib/angular/angular-cookies.min.js"></script> | ||
<script src="/js/lib/angular/angular-ui-router.min.js"></script> | ||
<script src="/js/app.js"></script> | ||
|
||
<script src="home.js"></script> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Created by Jesion on 2015-11-25. | ||
*/ | ||
|
||
var home = angular.module('home', ['app', 'ui.router']); | ||
|
||
home.config(function($stateProvider) { | ||
|
||
$stateProvider | ||
.state('main', { | ||
name: 'main', | ||
templateUrl: "/modules/home/main.html", | ||
controller: function ($scope, $state, $http, $cookieStore, appModel) { | ||
|
||
} | ||
}) | ||
}); | ||
|
||
home.controller('homeController', ['$state', '$scope', '$cookieStore', 'appConfig', 'appModel', 'appManager', function ($state, $scope, $cookieStore, appConfig, appModel, appManager) { | ||
appManager.init($cookieStore, $scope, appConfig, appModel, false); | ||
$state.go('main'); | ||
}]); |
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 @@ | ||
<div><p>Hello {{model.data.user.userId}} !</p></div> |
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
<div> | ||
<form> | ||
<div> | ||
<input ng-model="userId" placeholder="Your User Id or E-mail" type="text"> | ||
</div> | ||
<div> | ||
<input ng-model="password" placeholder="Password" type="text"> | ||
</div> | ||
<button ng-click="signIn()">Sign In</button> | ||
</form> | ||
</div> |
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