This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| function launchSupervisor { | |
| echo " #############################" | |
| echo " ! Supervisor will be START !" | |
| echo " #############################" | |
| supervisor -e 'js|ejs|node|coffee' -p 1000 -x npm -- start | |
| } | |
| function main { | |
| issupervisorinstalled=$(npm list supervisor 2>&1 | grep "empty") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* recommandé */ | |
| function handleRoutingErrors() { | |
| /** | |
| * Annulation de route : | |
| * Lors d'une erreur de routing aller au dashboard. | |
| * Fournir une clause de sortie si il essaye deux fois. | |
| */ | |
| $rootScope.$on('$routeChangeError', | |
| function (event, current, previous, rejection) { | |
| var destination = (current && (current.title || current.name || current.loadedTemplateUrl)) || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* recommandé */ | |
| angular | |
| .module('blocks.exception') | |
| .factory('exception', exception); | |
| exception.$inject = ['logger']; | |
| function exception(logger) { | |
| var service = { | |
| catcher: catcher |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* recommandé */ | |
| angular | |
| .module('blocks.exception') | |
| .config(exceptionConfig); | |
| exceptionConfig.$inject = ['$provide']; | |
| function exceptionConfig($provide) { | |
| $provide.decorator('$exceptionHandler', extendExceptionHandler); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gulp.task('js', ['jshint'], function () { | |
| var source = pkg.paths.js; | |
| return gulp.src(source) | |
| .pipe(sourcemaps.init()) | |
| .pipe(concat('all.min.js', {newLine: ';'})) | |
| .pipe(ngAnnotate({ | |
| add: true | |
| })) | |
| .pipe(bytediff.start()) | |
| .pipe(uglify({mangle: true})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function config ($routeProvider) { | |
| $routeProvider | |
| .when('/avengers', { | |
| templateUrl: 'avengers.html', | |
| controller: 'Avengers', | |
| controllerAs: 'vm', | |
| resolve: { /* @ngInject */ | |
| moviesPrepService: function (movieService) { | |
| return movieService.getMovies(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular | |
| .module('app') | |
| .controller('Avengers', Avengers); | |
| /* @ngInject */ | |
| function Avengers (storageService, avengerService) { | |
| var vm = this; | |
| vm.heroSearch = ''; | |
| vm.storeHero = storeHero; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular | |
| .module('app') | |
| .controller('Avengers', Avengers); | |
| /* @ngInject */ | |
| function Avengers (storageService, avengerService) { | |
| var vm = this; | |
| vm.heroSearch = ''; | |
| vm.storeHero = storeHero; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Recommandé */ | |
| function config ($routeProvider) { | |
| $routeProvider | |
| .when('/avengers', { | |
| templateUrl: 'avengers.html', | |
| controller: 'Avengers', | |
| controllerAs: 'vm', | |
| resolve: { | |
| moviesPrepService: moviePrepService | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // à l'intérieure de la définition d'une directive | |
| function outer() { | |
| return { | |
| controller: DashboardPanel, | |
| }; | |
| DashboardPanel.$inject = ['logger']; // l'injection ne fonctionne pas après le return | |
| function DashboardPanel(logger) { | |
| } | |
| } |