-
Notifications
You must be signed in to change notification settings - Fork 794
/
Copy pathangular.html
executable file
·1638 lines (1245 loc) · 55.8 KB
/
angular.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>INSPINIA Admin Theme Documentation</title>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="js/google-code-prettify/prettify.css" rel="stylesheet">
<style>
.documentation .jumbotron .row {
padding-top: 60px;
}
.anchor {
padding-top: 50px;
}
</style>
</head>
<body class="documentation">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">INSPINIA - Documentation</a>
</div>
</div>
</div>
<div class="jumbotron">
<div class="container">
<div class="row">
<div class="col-md-6">
<img src="img/angular_logo.png" alt="angular_logo">
<h2>Inspinia AngularJS</h2>
<small>
Inspinia AngularJs is full supported Angularjs version of INSPINIA theme.
</small>
<br/>
<p>Thank you for purchasing INSPINIA admin theme. If you have any questions about the template, please feel free to contact us via email: <a href="mailto:[email protected]">[email protected]</a>.
</p>
<small>
<strong>Documentation created:</strong> 02/09/2014<br/>
<strong>Latest update:</strong> 19/04/2017<br/>
<strong>By:</strong> WebAppLayers Team<br/>
<strong>Theme version:</strong> 2.7.1<br/>
</small>
<br/>
<small>
For HTML/CSS documentation go to: <a href="index.html">Static HTML/CSS documentation.</a><br/>
For ASP.NET MVC documentation go to: <a href="asp.net.mvc.html">ASP.NET MVC documentation.</a><br/>
For Ruby on Rails documentation go to: <a href="rails.html">RAILS documentation.</a><br/>
For Meteor documentation go to: <a href="meteor.html">METEOR documentation.</a>
</small>
</div>
<div class="col-md-6">
<img src="img/preview.png" alt="screen" class="img-responsive"/>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="alert alert-danger">
Please note that since Inspinia 2.5 we upgrade all Angular project to Angular 1.5 as well as all UI Bootstrap library to 1.1.2.
This update required to change all prefixes in UI Bootstrap - if you will update your exisitng project full migration path you can find here: https://github.com/angular-ui/bootstrap/wiki/Migration-guide-for-prefixes.
All current version are prepared with new prefixes.
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2>
Table of Contents
</h2>
<ul>
<li><a href="#documentation">About documentation</a></li>
<li><a href="#folder_structure">Folder structure</a></li>
<li><a href="#layout_structure">Layout structure</a></li>
<li><a href="#route_config">Route config / Lazy load</a></li>
<li><a href="#options">Options</a>
<ul>
<li><a href="#fixed_sidebar">Fixed sidebar</a></li>
<li><a href="#fixed_navbar">Fixed navbar</a></li>
<li><a href="#fixed_navbar2">Fixed navbar v.2</a></li>
<li><a href="#fixed_footer">Fixed footer</a></li>
<li><a href="#rtl_support">RTL support</a></li>
<li><a href="#layout_2">Layout 2</a></li>
<li><a href="#off_canvas_menu">Off canvas menu</a></li>
<li><a href="#skins">Skins</a></li>
<li><a href="#themeconfig">Theme config</a></li>
</ul>
</li>
<li><a href="#seed_project">Seed Project</a></li>
<li><a href="#grunt">Grunt Seed Project</a></li>
<li><a href="#gulp">Gulp Seed Project</a></li>
<li><a href="#meanjs">MEANJS Seed Project</a></li>
<li><a href="#change_log">Change log v.2.7 -> v.2.7.1</a></li>
<li><a href="#change_log">Change log v.2.6.2 -> v.2.7</a></li>
<li><a href="#change_log">Change log v.2.6 -> v.2.6.2</a></li>
<li><a href="#change_log">Change log v.2.5 -> v.2.6</a></li>
<li><a href="#change_log">Change log v.2.4 -> v.2.5</a></li>
<li><a href="#change_log">Change log v.2.3 -> v.2.4</a></li>
<li><a href="#change_log">Change log v.2.2 -> v.2.3</a></li>
<li><a href="#change_log">Change log v.2.0/2.1 -> v.2.2</a></li>
<li><a href="#change_log">Change log v.2.0 -> v.2.1</a></li>
<li><a href="#change_log">Change log v.1.9 -> v.2.0</a></li>
<li><a href="#change_log">Change log v.1.9 -> v.1.9.2</a></li>
<li><a href="#change_log">Change log v.1.8 -> v.1.9</a></li>
<li><a href="#contact">Contacts</a></li>
</ul>
</div>
</div>
<div class="row">
<a name="documentation" class="anchor"></a>
<div class="col-md-12">
<h3>About the documentation</h3>
<p>
This documentation is focused on AngularJs version. It assumes a minimum knowledge of angular framework. It describe mainly files and structure in project.
Please note that this documentation is dedicated to the main element of the template. With each version, we will try to develop it. But if you have any questions going beyond what is described
here don't hesitate to write to us on support email. We would love to help.
</p>
<div>
</div>
<div class="row">
<a name="folder_structure" class="anchor"></a>
<div class="col-md-6">
<h3>Structure</h3>
<h4>Folders and files</h4>
<p>File pack containing INSPINIA Angular template consists of 6 folders and 6 html files (in the main folder).</p>
<div><pre class="prettyprint linenums">
<code>Angular_version/
├── <strong>css/</strong>
├── <strong>email_templates/</strong>
├── <strong>font-awsome/</strong>
├── <strong>fonts/</strong>
├── <strong>img/</strong>
├── <strong>js/</strong>
├── <strong>views/</strong>
├── index.html
├── favicon.ico </code></pre>
</div>
<div><pre class="prettyprint linenums">
<code>js/
├── <strong>angular/</strong>
├── <strong>angular-translate/</strong>
├── <strong>bootstrap/</strong>
├── <strong>jquery/</strong>
├── <strong>plugins/</strong>
├── <strong>ui-router/</strong>
├── app.js
├── config.js
├── controllers.js
├── directives.js
├── inspinia.js
├── translations.js </code></pre>
</div>
</div>
<div class="col-md-6">
<h3>Main HTML elements</h3>
<p>Main index file are created with few main elements:</p>
<ol>
<li><code>navigation</code> left sidebar navigation.</li>
<li><code>top navbar</code> top navigation with second menu.</li>
<li><code>ui-view</code> main container for page elements.</li>
<li><code>footer</code> footer element.</li>
</ol>
<a target="_blank" href="img/page_angular.png"><img class="img-responsive" src="img/page_angular.png" alt="page structure"></a>
</div>
</div>
<div class="row">
<a name="layout_structure" class="anchor"></a>
<div class="col-lg-12">
<h3>Layout structure</h3>
<p>Page <code><head /></code> contains Metadata and all CSS files for theme and for all plugins. In your app you can choose only that file that you will use.</p>
<pre class="prettyprint linenums">
<!DOCTYPE html>
<html ng-app="inspinia">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Page title set in pageTitle directive -->
<title page-title></title>
<!-- Font awesome -->
<link href="font-awesome/css/font-awesome.css" rel="stylesheet">
<!-- Bootstrap and Fonts -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Main Inspinia CSS files -->
<link href="css/animate.css" rel="stylesheet">
<link id="loadBefore" href="css/style.css" rel="stylesheet">
</head>
</pre>
<hr>
<h3>Main index.html structure</h3>
<p>The body element has only one element <code><div ui-view></div></code> It is used to include all content of partial page.</p>
<pre class="prettyprint linenums">
<!-- ControllerAs syntax -->
<!-- Main controller with serveral data used in Inspinia theme on diferent view -->
<body ng-controller="MainCtrl as main">
<!-- Main view -->
<div ui-view></div>
</pre>
<p>Layout structure. Each state use template as a layout of page. Layout is located in views/common/content.html file and the structure looks like this:</p>
<pre class="prettyprint linenums">
<!-- Wrapper-->
<div id="wrapper">
<!-- Navigation -->
<div ng-include="'views/common/navigation.html'"></div>
<!-- Page wraper -->
<!-- ng-class with current state name give you the ability to extended customization your view -->
<div id="page-wrapper" class="gray-bg {{$state.current.name}}">
<!-- Page wrapper -->
<div ng-include="'views/common/topnavbar.html'"></div>
<!-- Main view -->
<div ui-view></div>
<!-- Footer -->
<div ng-include="'views/common/footer.html'"></div>
</div>
<!-- End page wrapper-->
</div>
<!-- End wrapper-->
</pre>
<p>
This separation gives you ability to create and modify own layout structure for different pages. For example Dashboard 4 has different layout - content_top navigation (without sidebar navigation).
</p>
<pre class="prettyprint linenums">
<!-- Wrapper-->
<div id="wrapper" class="top-navigation">
<!-- Navigation -->
<div ng-include="'views/common/top_navigation.html'"></div>
<!-- Page wraper -->
<!-- ng-class with current state name give you the ability to extended customization your view -->
<div id="page-wrapper" class="gray-bg {{$state.current.name}}">
<!-- Main view -->
<div ui-view></div>
<!-- Footer -->
<div ng-include="'views/common/footer.html'"></div>
</div>
<!-- End page wrapper-->
</div>
<!-- End wrapper-->
</pre>
<hr>
<h3>Page Script </h3>
<p>On bottom of file there are scripts. Index.html contains main plugin scripts. Rest of the scripts (plugins, directive .etc are included dynamical by ocLazyLoad)
After that there is a angular script with controllers and directives files. In Inspinia admin theme we use flat structure of controllers and directives files witch mean that all controllers and directives is in one file.
Of course in live app we will probably separate those functions for separate file and use ocLazyLoad to load it when the app need it. Look at the section with routing to get more info how to load file dynamical.
</p>
<pre class="prettyprint linenums">
<!-- jQuery and Bootstrap -->
<script src="js/jquery/jquery-2.1.1.min.js"></script>
<script src="js/plugins/jquery-ui/jquery-ui.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<!-- MetsiMenu -->
<script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
<!-- SlimScroll -->
<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!-- Peace JS -->
<script src="js/plugins/pace/pace.min.js"></script>
<!-- Custom and plugin javascript -->
<script src="js/inspinia.js"></script>
<!-- Main Angular scripts-->
<script src="js/angular/angular.min.js"></script>
<script src="js/plugins/oclazyload/dist/ocLazyLoad.min.js"></script>
<script src="js/angular-translate/angular-translate.min.js"></script>
<script src="js/ui-router/angular-ui-router.min.js"></script>
<script src="js/bootstrap/ui-bootstrap-tpls-1.1.2.min.js"></script>
<!--
You need to include this script on any page that has a Google Map.
When using Google Maps on your own site you MUST signup for your own API key at:
https://developers.google.com/maps/documentation/javascript/tutorial#api_key
After your sign up replace the key in the URL below..
-->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDQTpXj82d8UpCi97wzo_nKXL7nYrd4G70"></script>
<!-- Anglar App Script -->
<script src="js/app.js"></script>
<script src="js/config.js"></script>
<script src="js/translations.js"></script>
<script src="js/directives.js"></script>
<script src="js/controllers.js"></script>
</body>
</html>
</pre>
<hr>
<a name="route_config" class="anchor"></a>
<h3>Route config / Lazy load</h3>
<p>To manage all route we use great plugin Ui.Router. AngularUI Router is a routing framework for AngularJS, which allows you to organize the parts of your interface into a state machine. Unlike the
$route service in the Angular ngRoute module, which is organized around URL routes, UI-Router is organized around states, which may optionally have routes, as well as other behavior, attached.
<br/>
<br/>
Below you can see example of configuration ui-view. Configuration routing are in config.js file
</p>
<pre class="prettyprint linenums">
function config($stateProvider, $urlRouterProvider, $ocLazyLoadProvider) {
$urlRouterProvider.otherwise("/dashboards/dashboard_1");
$stateProvider
// Other states
.....
.state('app.contacts', {
url: "/contacts",
templateUrl: "views/contacts.html",
data: { pageTitle: 'Contacts' }
})
.....
// Other states
</pre>
<p>
To avoid include all plugins files in first load you can include it dynamically. In each state we use ocLazyLoad module to dynamically load required (for state) resources/files.
For example if your view will have a flot chart then you will need have a flot js script files, flot css style files and flot angular directive files. You can of course include it in main index file
but it is suggested to load those files when the app is real need it - in state. Below is example of Dashbard 1 which loads three different plugins: Flot chart, Peiti chart, ChartJS.
</p>
<pre class="prettyprint linenums">
.state('dashboards.dashboard_1', {
url: "/dashboard_1",
templateUrl: "views/dashboard_1.html",
resolve: {
loadPlugin: function ($ocLazyLoad) {
return $ocLazyLoad.load([
{
serie: true,
name: 'angular-flot',
files: [ 'js/plugins/flot/jquery.flot.js', 'js/plugins/flot/jquery.flot.time.js', 'js/plugins/flot/jquery.flot.tooltip.min.js', 'js/plugins/flot/jquery.flot.spline.js', 'js/plugins/flot/jquery.flot.resize.js', 'js/plugins/flot/jquery.flot.pie.js', 'js/plugins/flot/curvedLines.js', 'js/plugins/flot/angular-flot.js', ]
},
{
name: 'angles',
files: ['js/plugins/chartJs/angles.js', 'js/plugins/chartJs/Chart.min.js']
},
{
name: 'angular-peity',
files: ['js/plugins/peity/jquery.peity.min.js', 'js/plugins/peity/angular-peity.js']
}
]);
}
}
})
</pre>
<p>
In first we load angular flot chart and all necessary files for it. We specify option <code>serie: true</code> to load all files sequentially.
Next you have to add name of module - <strong>it has to be the same name as the angular directive has</strong>.
In this example angular flot chart directive has name: angular-flot. And finally you must specify all files in array syntax.
</p>
<p>
Same with ChartJs and Peity charts. The directive for CharJS has name angles and we have to specify this name and specify all files.
The directive for Peity charts has name angular-peity and we have to specify this name and specify all files.
</p>
<p>
In full version (config file) you can find examples for all resources/directive/files with ocLazyLoad. But if you will include some new plugins you can always
go to directive file and check what is the name of this directive and specify it with name on state lazy laod.
</p>
<a name="options" class="anchor"></a>
<h3>Options</h3>
<p>Inspinia provide few option for you layout app. There are:
<ul>
<li>Fixed sidebar</li>
<li>Fixed navbar</li>
<li>Fixed footer</li>
<li>RTL support</li>
<li>Layout 2 (top navigation)</li>
<li>Off canvas menu</li>
<li>Skins</li>
</ul>
</p>
<a name="fixed_sidebar" class="anchor"></a>
<h4>Fixed sidebar</h4>
<p>
Fixed sidebar is a sidebar that is sticked on screen.
</p>
<p>
To add fixed sidebar you need to add .fixed-sidebar class to body.
</p>
<pre class="prettyprint linenums">
<body ng-controller="MainCtrl as main" class="fixed-sidebar">
</pre>
<p>
Next we will need to add slimScroll handle for sidebar. Go to js/directives.js file and find the sideNavigation() function and change it to this:
</p>
<pre class="prettyprint linenums">
function sideNavigation($timeout) {
return {
restrict: 'A',
link: function(scope, element) {
// Call the metsiMenu plugin and plug it to sidebar navigation
$timeout(function(){
element.metisMenu();
});
// Enable initial fixed sidebar
var sidebar = element.parent();
sidebar.slimScroll({
height: '100%',
railOpacity: 0.9,
});
}
};
};
</pre>
<p>
Be sure that you have included this files to your index.html file:
<pre class="prettyprint linenums">
<!-- SlimScroll -->
<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
</pre>
</p>
<a name="fixed_navbar" class="anchor"></a>
<h4>Fixed navbar</h4>
<p>
Fixed navbar is a top navbar that is sticked on screen.
</p>
<p>
To add fixed sidebar you need to add .fixed-nav class to body.
</p>
<pre class="prettyprint linenums">
<body ng-controller="MainCtrl as main" class="fixed-nav">
</pre>
<p>
Next we will need to change navbar from static to fixed. To do this go to views/common/topnavbar.html file and change .navbar-static-top class to navbar-fixed-top
</p>
<pre class="prettyprint linenums">
<nav class="navbar navbar-fixed-top" role="navigation">
</pre>
<a name="fixed_navbar2" class="anchor"></a>
<h4>Fixed navbar 2</h4>
<p>
Fixed navbar 2 is a top navbar that is sticked on screen and it's width is the same as the width of wrapper
</p>
<p>
To add fixed sidebar you need to add .fixed-nav class and .fixed-nav-basic class to body.
</p>
<pre class="prettyprint linenums">
<body ng-controller="MainCtrl as main" class="fixed-nav fixed-nav-basic">
</pre>
<p>
Next we will need to change navbar from static to fixed. To do this go to views/common/topnavbar.html file and change .navbar-static-top class to navbar-fixed-top
</p>
<pre class="prettyprint linenums">
<nav class="navbar navbar-fixed-top" role="navigation">
</pre>
<p>
Fixed navbar 2 works only on primary layout
</p>
<a name="fixed_footer" class="anchor"></a>
<h4>Fixed footer</h4>
<p>
Fixed footer is a bottom footer that is sticked on screen.
</p>
<p>
To add fixed bottom footer you just need to add .fixed class to footer class on views/common/footer.html file.
</p>
<pre class="prettyprint linenums">
<div class="footer fixed">
</pre>
<a name="rtl_support" class="anchor"></a>
<h4>Right-to-Left Language Support </h4>
<p>
Adding support for language written in a Right-To-Left (RTL) direction.
</p>
<p>
To add RTL support you will need to add new .rtls class to body element
</p>
<pre class="prettyprint linenums">
<body ng-controller="MainCtrl as main" class="rtls">
</pre>
<p>
Next you will need to add new bootstrap rtl support library bootstrap-rtl. Add new link to css file just below the css from bootstrap in index.html page like this:
</p>
<pre class="prettyprint linenums">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/plugins/bootstrap-rtl/bootstrap-rtl.min.css" rel="stylesheet">
</pre>
<p>
After that you will have RTL support similar to this:
</p>
<img class="img-responsive" src="img/rtl_support.png" alt="">
<a name="layout_2" class="anchor"></a>
<h4>Layout 2</h4>
<p>
Layout 2 is a top navigation with centered content layout.
</p>
<p>
For layout 2 we prepared special examples files in views/common
</p>
<ul>
<li>
content_top_navigation.html
</li>
<li>
top_navigation.html
</li>
</ul>
<p>
To use layout 2 all you need to do is to specify it with your state: (example from dashbard 4). In first you need to specify the templateUrl
</p>
<pre class="prettyprint linenums">
.state('dashboards_top', {
abstract: true,
url: "/dashboards_top",
templateUrl: "views/common/content_top_navigation.html",
})
</pre>
<p>
Next when you create new page all you need to do is to point to that abstract state like this:
</p>
<pre class="prettyprint linenums">
.state('dashboards_top.dashboard_4', {
url: "/dashboard_4",
templateUrl: "views/dashboard_4.html",
data: { pageTitle: 'Dashboard 4' },
}
</pre>
<p>
And you will get a Layout 2.
</p>
<img class="img-responsive" src="img/Dashboard_4.png" alt="">
<p>
You have to remember that now your menu is located in views/common/top_navigation.html file.
</p>
<a name="off_canvas_menu" class="anchor"></a>
<h4>Off canvas menu</h4>
<p>
Off canvas menu is a menu that not change the width of main wrapper page. It appear on top of the page.
</p>
<p>
To use off canvas menu you just need to add <code>.canvas-menu</code> to body element:
</p>
<pre class="prettyprint linenums">
<body class="canvas-menu">
</pre>
<p>And add extra directives in navigation.html. Firstly add <code>full-scroll</code> directive to <code>.sidebar-collapse</code> element like:</p>
<pre class="prettyprint linenums">
<div class="sidebar-collapse" full-scroll>
</pre>
<p>Next add new <code>clos-off-canvas</code> directive after <code>.sidebar-collapse</code> element like:</p>
<pre class="prettyprint linenums">
<div class="sidebar-collapse" full-scroll>
<span close-off-canvas></span>
</pre>
<a name="skins" class="anchor"></a>
<h4>Skins</h4>
<p>Inspinai theme has 3 diferent skins</p>
<p><strong>To change skin you just have to add skin class to body element.</strong></p>
<p>For example: to add skin Blue skin you just need to add <code>.skin-1</code> class to body element.</p>
<p>In LESS files skins.less you can find style for the skin. Below is a representation of css classes demand color skin.</p>
<ul>
<li><code>.skin-1</code> - Blue Light</li>
<li><code>.skin-2</code> - Inspinia Ultra {for support with Inspinai Ultra please contact with [email protected]}</li>
<li><code>.skin-3</code> - Yellow/purple</li>
<li><code>.md-skin</code> - Material Design Skin (In demo Inspinia Material Design version has also fixed sidebar and fixed navbar option)</li>
<li>Defaut skin does not need any class</li>
</ul>
<a name="themeconfig" class="anchor"></a>
<h4>Theme config</h4>
<p>Theme config is the configuration box for setting options in live preview. It is placed in the right side of page with green icon.</p>
<p>To not add html code to all pages we just add js script to append the config box. The function is located in inspinia.js file with comment // Append config box / Only for demo purpose</p>
<p>If you want to remove the config box all you need to do is to remove function below this comment.</p>
<hr>
<a name="seed_project" class="anchor"></a>
<h3>Angular Seed Project</h3>
<p> It is an application skeleton for a typical AngularJS web app. You can use it to quickly bootstrap your angular webapp projects. It has all necessary resources/files to help you started new project.
As your project will grow you will need to add new resources. Look at the full version to select the elements and resources you want to use.
</p>
<p>
File strucutre for Seed Project
</p>
<pre class="prettyprint linenums">
<code>Angular_Seed_Project/
├── <strong>css/</strong>
├── <strong>font-awsome/</strong>
├── <strong>fonts/</strong>
├── <strong>img/</strong>
├── <strong>js/</strong>
├── <strong>views/</strong>
├── index.html
</code></pre>
<hr>
<a name="grunt" class="anchor"></a>
<h3>Angular Seed Project Grunt</h3>
<p> It is an application skeleton for a typical AngularJS web app with implemented Grunt/Bower environment.
You can use it to quickly bootstrap your angular webapp projects. It has all necessary resources/files.
As your project will grow you will need to add new resources. Look at the full version to select the elements and resources you want to use.
</p>
<p>
<strong>First run</strong>
</p>
<p>
To run Angular Seed Project Grunt you will need a node instaled in your environment. If you don't have a node.js please go to this site <a href="http://nodejs.org">http://nodejs.org</a> and download and install proper version.
</p>
<p>
Next you will need to install grunt
</p>
<pre class="prettyprint linenums">
npm install -g grunt-cli
</pre>
<p>
Next you will need to install bower
</p>
<pre class="prettyprint linenums">
npm install -g bower
</pre>
<p>
And after that go to Angular Seed Project Grunt and run those commands to get all dependencies:
</p>
<pre class="prettyprint linenums">
npm install
bower install
</pre>
<p>Grunt file is based on Yeoman angular generator with some changes. There are three main task that you can do:</p>
<ul>
<li>
<code>grunt live</code> to launch a browser sync server on your source files
</li>
<li>
<code>grunt server</code> to launch a server on your optimized application
</li>
<li>
<code>grunt build</code> to build an optimized version of your application in /dist
</li>
</ul>
<hr>
<a name="gulp" class="anchor"></a>
<h3>Angular Seed Project Gulp</h3>
<p> It is an application skeleton for a typical AngularJS web app with implemented Gulp/Bower environment.
You can use it to quickly bootstrap your angular webapp projects. It has all necessary resources/files.
As your project will grow you will need to add new resources. Look at the full version to select the elements and resources you want to use.
</p>
<p>
<strong>First run</strong>
</p>
<p>
To run Angular Seed Project Gulp you will need a node instaled in your environment. If you don't have a node.js please go to this site <a href="http://nodejs.org">http://nodejs.org</a> and download and install proper version.
</p>
<p>
Next you will need to install gulp
</p>
<pre class="prettyprint linenums">
npm install -g gulp
</pre>
<p>
Next you will need to install bower
</p>
<pre class="prettyprint linenums">
npm install -g bower
</pre>
<p>
And after that go to Angular Seed Project Gulp and run those commands to get all dependencies:
</p>
<pre class="prettyprint linenums">
npm install
bower install
</pre>
<p>Gulp file is based on angular gulp generator (https://github.com/Swiip/generator-gulp-angular). There are few main task that you can do:</p>
<ul>
<li>
<code>gulp</code> or <code>gulp build</code> to build an optimized version of your application in <code>/dist</code>
</li>
<li>
<code>gulp serve</code> to launch a browser sync server on your source files</li>
<li>
<code>gulp serve:dist</code> to launch a server on your optimized application</li>
<li>
<code>gulp test</code> to launch your unit tests with Karma</li>
<li>
<code>gulp test:auto</code> to launch your unit tests with Karma in watch mode</li>
<li>
<code>gulp protractor</code> to launch your e2e tests with Protractor</li>
<li>
<code>gulp protractor:dist</code> to launch your e2e tests with Protractor on the dist files</li>
</ul>
<p>
In bower.js file there are specify needed resources for Seed Project.
</p>
<hr>
<a name="meanjs" class="anchor"></a>
<h3>Angular Seed Project MEANJS</h3>
<p> It is an application skeleton for a typical AngularJS with MEANJS (http://meanjs.org/) - Version 0.4.2.
You can use it to quickly bootstrap your angular webapp projects. It has all necessary resources/files.
</p>
<p>
<strong>First run</strong>
</p>
<p>
To run MEANJS Angular Seed Project you will need a node instaled in your environment. If you don't have a node.js please go to this site <a href="http://nodejs.org">http://nodejs.org</a> and download and install proper version.
</p>
<p>
Next you will need to install Grunt
</p>
<pre class="prettyprint linenums">
npm install -g grunt-cli
</pre>
<p>
Next you will need to install bower
</p>
<pre class="prettyprint linenums">
npm install -g bower
</pre>
<p>
Next you will need to install mongodb. Please go to <a href="https://www.mongodb.org/downloads">https://www.mongodb.org/downloads</a> to install mongodb.
</p>
<p>
Next you will need to run your mongodb database. As it depends on your platform see mongodb site to run mongo database: <a href="http://docs.mongodb.org/manual/">http://docs.mongodb.org/manual/</a>
</p>
<p>
And after that go to MEANJS Seed Project and run those commands to get all dependencies:
</p>
<pre class="prettyprint linenums">
npm install
bower install
</pre>
<p>
In bower.js file there are specify needed resources for Seed Project.
</p>
<p><strong>As this is only a theme to MEANJS we will not copy and put here full docs from MEANJS. Please go to MEANJS doc to get more info
how to use it <a href="http://meanjs.org/docs.html">http://meanjs.org/docs.html</a> </strong></p>
<p>If you have any questions feel free to contact with us: <a href="mailto:[email protected]">[email protected]</a></p>
<a name="change_log" class="anchor"></a>
<h3>Change log 2.7 -> 2.7.1</h3>
<ul>
<strong>Changed Inspinia js files</strong>
<li> inspinia.js - correct typos in fix_height function</li>
<hr>
<strong>CSS/LESS/SCSS/SASS</strong>
<li>Fix media-body style on right sidebar</li>