Skip to content

Commit f79ac07

Browse files
committed
Updated demo
1 parent 93c69f9 commit f79ac07

File tree

7 files changed

+31769
-52
lines changed

7 files changed

+31769
-52
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
components
33
.DS_Store
4+
.idea

app.routes.js

+11-21
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
/**
3-
* Include 'door3.css' as a dependency
3+
* Include 'angularCSS' as a dependency
44
* ngRoute is optional (no configuration required)
55
*/
6-
var myApp = angular.module('myApp', ['ngRoute','door3.css','hljs']);
6+
var myApp = angular.module('myApp', ['ngRoute','angularCSS','hljs']);
77

88
/**
99
* Routes definition example
@@ -37,7 +37,7 @@ myApp.config(function($routeProvider) {
3737
templateUrl: 'pages/yellow/page-yellow.html',
3838
css: [
3939
{
40-
href: 'pages/yellow/page-yellow.css',
40+
href: 'pages/yellow/page-yellow.css'
4141
}, {
4242
href: 'pages/yellow/page-yellow.mobile.css',
4343
/* Media Query support via window.matchMedia API
@@ -64,26 +64,16 @@ myApp.config(function($routeProvider) {
6464
* Directive Definition Object (DDO) examples
6565
*/
6666

67-
myApp.directive('black', function () {
68-
return {
69-
restrict: 'E',
70-
replace: true,
71-
templateUrl: 'directives/black/directive-black.html',
72-
/* Binding css to directives */
73-
css: 'directives/black/directive-black.css'
74-
}
67+
myApp.component('black', {
68+
templateUrl: 'directives/black/directive-black.html',
69+
css: 'directives/black/directive-black.css' /* Binding css to component */
7570
});
7671

77-
myApp.directive('cyan', function () {
78-
return {
79-
restrict: 'E',
80-
replace: true,
81-
templateUrl: 'directives/cyan/directive-cyan.html',
82-
/* Same syntax as in the routes example applies here */
83-
css: {
84-
href: 'directives/cyan/directive-cyan.css',
85-
bustCache: true
86-
}
72+
myApp.component('cyan', {
73+
templateUrl: 'directives/cyan/directive-cyan.html',
74+
css: { /* Same syntax as in the routes example applies here */
75+
href: 'directives/cyan/directive-cyan.css',
76+
bustCache: true
8777
}
8878
});
8979

app.states.js

+12-22
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11

22
/**
3-
* Include 'door3.css' as a dependency
3+
* Include 'angularCSS' as a dependency
44
* ui.router is optional (no configuration required)
55
*/
6-
var myApp = angular.module('myApp', ['ui.router','door3.css','hljs']);
6+
var myApp = angular.module('myApp', ['ui.router','angularCSS','hljs']);
77

88
/**
99
* States definition example
1010
*/
1111
myApp.config(function($stateProvider, $urlRouterProvider) {
1212

13-
$urlRouterProvider.otherwise('/')
13+
$urlRouterProvider.otherwise('/');
1414

1515
/**
1616
* State provider settings
@@ -111,7 +111,7 @@ myApp.config(function($stateProvider, $urlRouterProvider) {
111111
},
112112
css: [
113113
{
114-
href: 'pages/yellow/page-yellow.css',
114+
href: 'pages/yellow/page-yellow.css'
115115
}, {
116116
href: 'pages/yellow/page-yellow.mobile.css',
117117
/* Media Query support via window.matchMedia API
@@ -136,26 +136,16 @@ myApp.config(function($stateProvider, $urlRouterProvider) {
136136
* Directive Definition Object (DDO) examples
137137
*/
138138

139-
myApp.directive('black', function () {
140-
return {
141-
restrict: 'E',
142-
replace: true,
143-
templateUrl: 'directives/black/directive-black.html',
144-
/* Binding css to directives */
145-
css: 'directives/black/directive-black.css'
146-
}
139+
myApp.component('black', {
140+
templateUrl: 'directives/black/directive-black.html',
141+
css: 'directives/black/directive-black.css' /* Binding css to component */
147142
});
148143

149-
myApp.directive('cyan', function () {
150-
return {
151-
restrict: 'E',
152-
replace: true,
153-
templateUrl: 'directives/cyan/directive-cyan.html',
154-
/* Same syntax as in the states example applies here */
155-
css: {
156-
href: 'directives/cyan/directive-cyan.css',
157-
bustCache: true
158-
}
144+
myApp.component('cyan', {
145+
templateUrl: 'directives/cyan/directive-cyan.html',
146+
css: { /* Same syntax as in the routes example applies here */
147+
href: 'directives/cyan/directive-cyan.css',
148+
bustCache: true
159149
}
160150
});
161151

index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
</ul>
4444
<ul class="nav navbar-nav navbar-right">
4545
<li class="link-black">
46-
<a target="_blank" href="http://www.github.com/door3/angular-css">GitHub</a>
46+
<a target="_blank" href="http://www.github.com/castillo-io/angular-css">GitHub</a>
4747
</li>
4848
</ul>
4949
</div>
@@ -103,21 +103,21 @@ <h2 class="page-heading">{{ 'Demo Source Code' }}</h2>
103103
<footer class="demo-footer">
104104
<div class="container">
105105
<div class="navbar-footer">
106-
Designed, developed and maintained by <a target="_blank" href="http://www.door3.com">DOOR3</a>
106+
Designed, developed and maintained by <a target="_blank" href="http://www.castillo.io">Alex Castillo</a>
107107
</div>
108108
</div>
109109
</footer>
110110

111111
<!-- AngularJS core and dependencies -->
112-
<script src="lib/angular-1.3.7/angular.js"></script>
113-
<script src="lib/angular-1.3.7/angular-route.js"></script>
112+
<script src="lib/angular-1.5.3/angular.js"></script>
113+
<script src="lib/angular-1.5.3/angular-route.js"></script>
114114

115115
<!-- Third-party scripts for demo -->
116116
<script src="lib/highlightjs/8.3/highlight.min.js"></script>
117117
<script src="lib/angular-highlightjs/angular-highlightjs.min.js"></script>
118118

119119
<!-- AngularCSS library (from CDN) -->
120-
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-css/1.0.6/angular-css.js"></script>
120+
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-css/1.0.8/angular-css.js"></script>
121121

122122
<!-- App Demo scripts -->
123123
<script src="app.routes.js"></script>

0 commit comments

Comments
 (0)