Skip to content

Commit baca268

Browse files
committed
Full AngularJS Skeleton app.
0 parents  commit baca268

File tree

25 files changed

+376
-0
lines changed

25 files changed

+376
-0
lines changed

.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
indent_style = space
14+
indent_size = 2
15+
16+
[*.js]
17+
indent_style = space
18+
indent_size = 2
19+
20+
[*.css]
21+
indent_style = space
22+
indent_size = 2
23+
24+
[*.html]
25+
indent_style = space
26+
indent_size = 2
27+
28+
[*.{diff,md}]
29+
trim_trailing_whitespace = false

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
7+
# dependencies
8+
/node_modules
9+
/bower_components
10+
11+
# misc
12+
.DS_Store
13+
.idea

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# AngularJS Skeleton
2+
3+
This README outlines the details of collaborating on this AngularJS 1.x application.
4+
A short introduction of this app could easily go here.
5+
6+
## Default AngularJS modules
7+
8+
* Routing using [ui-router](https://github.com/angular-ui/ui-router)
9+
* Models like ORM using [angular-restmod](https://github.com/platanus/angular-restmod)
10+
* Authentication (token-based) using [satellizer](https://github.com/sahat/satellizer)
11+
12+
## Prerequisites
13+
14+
You will need the following things properly installed on your computer.
15+
16+
* [Git](http://git-scm.com/)
17+
* [Node.js](http://nodejs.org/) (with NPM)
18+
* [Bower](http://bower.io/)
19+
20+
## Installation
21+
22+
* `git clone <repository-url>` this repository
23+
* change into the new directory
24+
* `npm install`
25+
* `bower install`
26+
27+
## Running, build and live reload (AIO command)
28+
29+
* `gulp`
30+
* Visit your app at [http://localhost:8000](http://localhost:8000).
31+
32+
## Running / Development
33+
34+
* `gulp server`
35+
* Visit your app at [http://localhost:8000](http://localhost:8000).
36+
37+
## Building
38+
39+
* `gulp build-inject`
40+
41+

app/app.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
(function () {
2+
3+
//Main module named 'app' with its module dependencies
4+
angular.module('app', ['ui.router', 'restmod', 'satellizer']).config(restmodAdapter).config(satellizerAdapter);
5+
6+
//Injecting service dependencies
7+
restmodAdapter.$inject = ['restmodProvider'];
8+
satellizerAdapter.$inject = ['$authProvider'];
9+
10+
//Restmod configuration for models representation like ORM
11+
function restmodAdapter (restmodProvider) {
12+
13+
restmodProvider.rebase({
14+
$config: {
15+
urlPrefix: 'http://localhost/api/v1',
16+
style: 'APIStyle'
17+
},
18+
$extend: {
19+
Model: {
20+
encodeUrlName: function (_name) {
21+
return _name.toLowerCase();
22+
}
23+
}
24+
}
25+
});
26+
}
27+
28+
//Satellizer configuration for user authentication using JWT
29+
function satellizerAdapter ($authProvider) {
30+
31+
$authProvider.loginUrl = 'http://localhost/api/v1/signin';
32+
$authProvider.signupUrl = 'http://localhost/api/v1/signup';
33+
$authProvider.tokenName = 'token';
34+
$authProvider.tokenPrefix = 'app';
35+
}
36+
37+
})();

app/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//Here, define all App constants

app/controllers/.gitkeep

Whitespace-only changes.

app/decorators/.gitkeep

Whitespace-only changes.

app/directives/.gitkeep

Whitespace-only changes.

app/filters/.gitkeep

Whitespace-only changes.

app/index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<title>App</title>
7+
<meta name="description" content="">
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
10+
<!-- inject:css -->
11+
<!-- Latest compiled CSS -->
12+
<!-- endinject -->
13+
14+
</head>
15+
<body ng-app="app">
16+
17+
<ui-view></ui-view>
18+
19+
<!-- inject:js -->
20+
<!-- Latest compiled JS -->
21+
<!-- endinject -->
22+
23+
</body>
24+
</html>

0 commit comments

Comments
 (0)