Skip to content

Commit 66a8a2e

Browse files
author
Jad Joubran
committed
Release version 1.2
1 parent dd40c97 commit 66a8a2e

File tree

22 files changed

+256
-60
lines changed

22 files changed

+256
-60
lines changed

angular/app/dashboard/dashboard.html

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1-
<div ng-controller="DashboardCtrl">
2-
Hello World, Dashboard
1+
<div ng-controller="DashboardCtrl" class="Dashboard-Container">
2+
<md-content class="md-padding">
3+
<md-tabs md-dynamic-height md-border-bottom>
4+
<md-tab label="Laravel 5">
5+
<md-content class="md-padding">
6+
<h1 class="md-display-1">Laravel 5</h1>
7+
<p>
8+
The Laravel 5 that you loved, comes configured to run with AngularJS:<br>
9+
<ul>
10+
<li>A view (resources/index.blade.php) that loads all the assets you need (CSS and JS) &amp; sets up angular ui-router</li>
11+
<li>Support for CSRF token when using the API</li>
12+
<li><a href="https://github.com/barryvdh/laravel-debugbar" target="_blank">Debugbar</a> for Laravel 5: It's that bar you see at the bottom. Very useful for debugging the API</li>
13+
<li>Sample API endpoints</li>
14+
<li>Elixir configuration for Angular, jshint, jscs, imagemin and more!</li>
15+
</ul>
16+
</p>
17+
</md-content>
18+
</md-tab>
19+
<md-tab label="AngularJS">
20+
<md-content class="md-padding">
21+
<h1 class="md-display-1">AngularJS</h1>
22+
<p>
23+
AngularJS comes ready to communicate with the Laravel 5 API that you're building. It actually comes with a few sample API endpoints!<br>
24+
This is what you have out of the box:
25+
<ul>
26+
<li>A flexible and powerful router for Angular: <a href="https://github.com/angular-ui/ui-router" target="_blank">ui-router</a></li>
27+
<li><a href="https://github.com/mgonto/restangular" target="_blank">Restangular</a> makes communicating with the API a breeze!</li>
28+
<li>Support for CSRF token via Restangular</li>
29+
<!-- <li>Sample API calls</li> -->
30+
<li>Sample UI router with multiple views (main &amp; footer)</li>
31+
<li>UI Router sample authentication</li>
32+
<li>ngstorage module which simplifies access to localStorage.. The Angular way!</li>
33+
</ul>
34+
</p>
35+
</md-content>
36+
</md-tab>
37+
<md-tab label="Angular Material">
38+
<md-content class="md-padding">
39+
<h1 class="md-display-1">Angular Material</h1>
40+
<p>
41+
Material Design as a UI library! Chosen instead of bootstrap in order to avoid injecting jQuery with Angular.<br>
42+
Here's what you'll get:
43+
<ul>
44+
<li>Sample Landing and Dashboard pages design with Material Design</li>
45+
<!-- <li>Custom Material Design theme so that you can easily create your own theme</li> -->
46+
<li>Sample Dialog, Toast notifications &amp; Tabs</li>
47+
</ul>
48+
</p>
49+
</md-content>
50+
</md-tab>
51+
</md-tabs>
52+
</md-content>
353
</div>

angular/app/dashboard/dashboard.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.Dashboard-Container li{
2+
line-height: 26px;
3+
}

angular/app/footer/footer.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div class="Footer-Container">
2+
Laravel5 Angular Material Starter<br>
3+
Don't forget to <a href="https://github.com/jadjoubran/laravel5-angular-material-starter/stargazers" target="_blank">star</a> the repository if you like it!
4+
</div>

angular/app/footer/footer.js

Whitespace-only changes.

angular/app/footer/footer.less

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.Footer-Container{
2+
background-color: #ececec;
3+
padding: 30px;
4+
position: fixed;
5+
bottom: 20px;
6+
left: 0;
7+
right: 0;
8+
text-align: center;
9+
}

angular/app/landing/landing.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@ <h2 class="md-title">Landing page</h2>
1717
</div>
1818
</md-card>
1919
<br>
20-
<!-- <md-button ui-sref="dashboard" class="md-raised md-primary">Show me the Dashboard!</md-button> -->
20+
<div class="Landing-CallToAction">
21+
<md-button ui-sref="dashboard" class="md-raised md-primary">Show me the Dashboard!</md-button>
22+
</div>
2123
</div>

angular/app/landing/landing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
angular.module('app.controllers').controller('LandingCtrl', function( $scope, $mdToast, $mdDialog ){
55

6-
$scope.promoImage = 'https://d1zj60nuin5mrx.cloudfront.net/media/2015/05/08130731/laravel-angular.png';
6+
$scope.promoImage = 'http://i.imgur.com/XiMykki.png';
77

88
$scope.toastNotification = function(){
99
$mdToast.show(

angular/app/landing/landing.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
.Landing-Container{
22
max-width: 500px;
33
margin: 0 auto 0 auto;
4+
}
5+
6+
.Landing-CallToAction{
7+
text-align: center;
48
}

angular/app/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
]);
1313

1414
angular.module('app.routes', ['ui.router', 'ngStorage']);
15-
angular.module('app.controllers', ['ui.router', 'ngMaterial', 'ngStorage']);
15+
angular.module('app.controllers', ['ui.router', 'ngMaterial', 'ngStorage', 'restangular']);
1616
angular.module('app.filters', []);
17-
angular.module('app.services', ['ui.router', 'ngStorage']);
17+
angular.module('app.services', ['ui.router', 'ngStorage', 'restangular']);
1818
angular.module('app.directives', []);
1919
angular.module('app.config', []);
2020

angular/app/routes.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,23 @@
1010
$urlRouterProvider.otherwise('/');
1111

1212
$stateProvider
13-
.state('landing',{
13+
.state('landing', {
1414
url: '/',
15-
templateUrl: getView('landing')
15+
views: {
16+
main: {
17+
templateUrl: getView('landing')
18+
}
19+
}
20+
}).state('dashboard', {
21+
url: '/dashboard',
22+
views: {
23+
main: {
24+
templateUrl: getView('dashboard')
25+
},
26+
footer: {
27+
templateUrl: getView('footer')
28+
}
29+
}
1630
});
1731

1832

angular/config/http.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

angular/config/restangular.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(function(){
2+
"use strict";
3+
4+
angular.module('app.config').config( function(RestangularProvider) {
5+
RestangularProvider
6+
.setBaseUrl('/api/1/')
7+
.setDefaultHeaders({'X-CSRF-TOKEN': document.getElementById('csrf-token').value });
8+
});
9+
10+
})();

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"angular": "1.3",
1515
"angular-ui-router": "~0.2.14",
1616
"ngstorage": "~0.3.3",
17-
"angular-material": "~0.9.4"
17+
"angular-material": "~0.9.4",
18+
"restangular": "~1.5.1"
1819
}
1920
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.1.1",
2+
"version": "1.2.0",
33
"devDependencies": {
44
"del": "^1.1.1",
55
"gulp": "^3.8.8",

public/css/all.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
.Dashboard-Container li {
2+
line-height: 26px;
3+
}
4+
5+
.Footer-Container {
6+
background-color: #ececec;
7+
padding: 30px;
8+
position: fixed;
9+
bottom: 20px;
10+
left: 0;
11+
right: 0;
12+
text-align: center;
13+
}
114

215
.Landing-Container {
316
max-width: 500px;
417
margin: 0 auto 0 auto;
518
}
19+
.Landing-CallToAction {
20+
text-align: center;
21+
}
622

0 commit comments

Comments
 (0)