forked from angular-app/angular-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic app structure and Grunt build modifications
- Loading branch information
1 parent
c344126
commit f47cde7
Showing
12 changed files
with
82 additions
and
20 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 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 |
---|---|---|
@@ -1,9 +1,16 @@ | ||
<html> | ||
<html ng-app="app"> | ||
<head> | ||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.js"></script> | ||
<script type="text/javascript" src="app.js"></script> | ||
<script type="text/javascript" src="angular-app.min.js"></script> | ||
|
||
<!-- partials start --> | ||
<%= grunt.file.read('dist/partials.tpl.html') %> | ||
<!-- partials end --> | ||
|
||
</head> | ||
<body ng-app="app" ng-controller="MainController"> | ||
Hello, {{hello}}! | ||
<body ng-controller="AppController"> | ||
Hello, {{user || 'Anonymous'}}! You are here: {{location.path()}} | ||
<hr> | ||
<div ng-view></div> | ||
</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,11 @@ | ||
angular.module('app', ['signin', 'dashboard']); | ||
|
||
angular.module('app').config(['$routeProvider', function ($routeProvider) { | ||
$routeProvider.when('/signin', {templateUrl:'signin.form.tpl.html', controller:'SignInController'}); | ||
$routeProvider.when('/dashboard', {templateUrl:'dashboard.tpl.html', controller:'DashboardController'}); | ||
$routeProvider.otherwise({redirectTo:'/signin'}); | ||
}]); | ||
|
||
angular.module('app').controller('AppController', ['$scope', '$location', function ($scope, $location) { | ||
$scope.location = $location; | ||
}]); |
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,3 @@ | ||
angular.module('dashboard',[]); | ||
angular.module('dashboard').controller('DashboardController', ['$scope', function($scope){ | ||
}]); |
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>Dashboard!</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<form name="signin"> | ||
login: <input name="login" ng-model="user.login"><br> | ||
pass: <input name="pass" ng-model="user.pass"><br> | ||
<a href="#/dashboard">Sign in</a> | ||
</form> |
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,4 @@ | ||
angular.module('signin', []); | ||
angular.module('signin').controller('SignInController', ['$scope', function($scope){ | ||
$scope.user = {}; | ||
}]); |
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
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 @@ | ||
//jasmine template here |
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,7 @@ | ||
- There is no npm module for AngularJS, so its version is hard-coded, libs checked-in (for tests) etc. | ||
|
||
Nice to have | ||
----------------------------------------------------------------------- | ||
- grunt task to: | ||
- create new modules | ||
- concat partials (globally or per-module?) |