Download pool/shard008/JavaScript/0050262_index.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 2.47 kB
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard008/JavaScript/0050262_index.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard008/JavaScript/0050262_index.js
-
curl -L -o 0050262_index.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard008/JavaScript/0050262_index.js
2.47 kB
| ; | |
| /** | |
| * Module dependencies | |
| */ | |
| var angular = require('angular'), | |
| AppContainer = require('./directives/appContainer'); | |
| module.exports = angular | |
| .module('app.main', [ | |
| require('../common/libs').name, | |
| require('../common/db').name, | |
| ]) | |
| .constant('config', { | |
| backdrop : true, | |
| debug : true, | |
| defaultRoute : '/notes', | |
| activeTimerId : 'at', | |
| hrefWhitelist : /^\s*(https?|ftp|mailto|file|tel):/ | |
| }) | |
| .constant('appVersion', require('../../package.json').version) | |
| .config(function ($compileProvider, $urlRouterProvider, config) { | |
| // set anchor href whitelist | |
| if (config.hrefWhitelist) { | |
| $compileProvider.aHrefSanitizationWhitelist(config.hrefWhitelist); | |
| } | |
| // add default route | |
| if (config.defaultRoute) { | |
| $urlRouterProvider.otherwise(config.defaultRoute); | |
| } | |
| }) | |
| .config(function (dbsProvider) { | |
| dbsProvider | |
| .db('notes', { | |
| auto_compaction : true, | |
| adapter : 'websql' | |
| }); | |
| }) | |
| .directive('appContainer', AppContainer) | |
| .factory('app', require('./services/app')) | |
| .run(function ($log, $rootScope, $ionicBackdrop, $timeout, config) { | |
| $log.debug('app.main module - run'); | |
| if (config.debug) { | |
| $rootScope.$on('$stateChangeStart', | |
| function (event, toState) { | |
| $log.debug('$stateChangeStart -', toState.name); | |
| }); | |
| $rootScope.$on('$stateChangeSuccess', | |
| function (event, toState) { | |
| $log.debug('$stateChangeSuccess -', toState.name); | |
| }); | |
| } | |
| $rootScope.$on('$stateNotFound', | |
| function (event, unfoundState, fromState, fromParams) { | |
| $log.warn('$stateNotFound', { | |
| event : event, | |
| unfoundState : unfoundState, | |
| fromState : fromState, | |
| fromParams : fromParams | |
| }); | |
| }); | |
| $rootScope.$on('$stateChangeError', | |
| function (event, toState, toParams, fromState, fromParams, error) { | |
| $log.error('$stateChangeError', { | |
| event : event, | |
| toState : toState, | |
| toParams : toParams, | |
| fromState : fromState, | |
| fromParams : fromParams, | |
| error : error | |
| }); | |
| if (error) { | |
| throw error; | |
| } | |
| }); | |
| // add backdrop if enabled | |
| if (config.backdrop) { | |
| $ionicBackdrop.retain(); | |
| $timeout(function () { | |
| $ionicBackdrop.release(); | |
| }, 600); | |
| } | |
| }); | |