|
| 1 | +'use strict'; |
| 2 | + |
| 3 | +angular.module('dashboard', ['ui.router']) |
| 4 | + .config(function($stateProvider, $urlRouterProvider) { |
| 5 | + $stateProvider |
| 6 | + .state('main.dashboard', { |
| 7 | + url: '/dashboard', |
| 8 | + templateUrl: 'modules/dashboard/dashboard.html', |
| 9 | + controller: 'DashboardCtrl' |
| 10 | + }); |
| 11 | + |
| 12 | + $urlRouterProvider.when('/', '/main/dashboard'); |
| 13 | + }) |
| 14 | + .controller('DashboardCtrl', function($scope) { |
| 15 | + $scope.awesomeThings = [{ |
| 16 | + 'key': 'angular', |
| 17 | + 'title': 'AngularJS', |
| 18 | + 'url': 'https://angularjs.org/', |
| 19 | + 'description': 'HTML enhanced for web apps!', |
| 20 | + 'logo': 'angular.png' |
| 21 | + }, { |
| 22 | + 'key': 'browsersync', |
| 23 | + 'title': 'BrowserSync', |
| 24 | + 'url': 'http://browsersync.io/', |
| 25 | + 'description': 'Time-saving synchronised browser testing.', |
| 26 | + 'logo': 'browsersync.png' |
| 27 | + }, { |
| 28 | + 'key': 'gulp', |
| 29 | + 'title': 'GulpJS', |
| 30 | + 'url': 'http://gulpjs.com/', |
| 31 | + 'description': 'The streaming build system.', |
| 32 | + 'logo': 'gulp.png' |
| 33 | + }, { |
| 34 | + 'key': 'jasmine', |
| 35 | + 'title': 'Jasmine', |
| 36 | + 'url': 'http://jasmine.github.io/', |
| 37 | + 'description': 'Behavior-Driven JavaScript.', |
| 38 | + 'logo': 'jasmine.png' |
| 39 | + }, { |
| 40 | + 'key': 'karma', |
| 41 | + 'title': 'Karma', |
| 42 | + 'url': 'http://karma-runner.github.io/', |
| 43 | + 'description': 'Spectacular Test Runner for JavaScript.', |
| 44 | + 'logo': 'karma.png' |
| 45 | + }, { |
| 46 | + 'key': 'protractor', |
| 47 | + 'title': 'Protractor', |
| 48 | + 'url': 'https://github.com/angular/protractor', |
| 49 | + 'description': 'End to end test framework for AngularJS applications built on top of WebDriverJS.', |
| 50 | + 'logo': 'protractor.png' |
| 51 | + }, { |
| 52 | + 'key': 'jquery', |
| 53 | + 'title': 'jQuery', |
| 54 | + 'url': 'http://jquery.com/', |
| 55 | + 'description': 'jQuery is a fast, small, and feature-rich JavaScript library.', |
| 56 | + 'logo': 'jquery.jpg' |
| 57 | + }, { |
| 58 | + 'key': 'bootstrap', |
| 59 | + 'title': 'Bootstrap', |
| 60 | + 'url': 'http://getbootstrap.com/', |
| 61 | + 'description': 'Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.', |
| 62 | + 'logo': 'bootstrap.png' |
| 63 | + }, { |
| 64 | + 'key': 'less', |
| 65 | + 'title': 'Less', |
| 66 | + 'url': 'http://lesscss.org/', |
| 67 | + 'description': 'Less extends the CSS language, adding features that allow variables, mixins, functions and many other techniques.', |
| 68 | + 'logo': 'less.png' |
| 69 | + }]; |
| 70 | + angular.forEach($scope.awesomeThings, function(awesomeThing) { |
| 71 | + awesomeThing.rank = Math.random(); |
| 72 | + }); |
| 73 | + }); |
0 commit comments