Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import angular from 'angular';
import '@ovh-ux/manager-core';
import '@ovh-ux/ng-ovh-api-wrappers'; // should be a peer dependency of ovh-api-services
import 'angular-translate';
import 'ovh-api-services';
import 'ovh-ui-angular';
import routing from './add.routing';
const moduleName = 'ovhManagerPciProjectSshKeysAdd';
angular
.module(moduleName, [
'oui',
'ovhManagerCore',
'ovh-api-services',
'pascalprecht.translate',
])
.config(routing)
.run(/* @ngTranslationsInject:json ./translations */);
export default moduleName;
export const lazyLoadingOnScroll = () => {
angular.module(APP_NAME, [SelectNG]).controller('testCtrl', function ctrl($q, $timeout) {
const PAGE_SIZE = 20;
// Result array is increasing after each method call
this.getOptions = (skip, query) => {
action('getOptions')('query = ', query, 'skip = ', skip);
const arr = [];
if (skip < 50) {
for (let i = 0; i < PAGE_SIZE; ++i) {
let labelText = `${skip}-${i}`;
if (query) {
labelText = `${query} ${labelText}`;
}
arr.push(labelText);
}
if (skip === 0) {
arr.unshift('Unexpected option at the beginning');
// Imports
import angular from 'angular';
import RouterHelper from './routerHelper.provider';
/**
* @desc Module initialize.
*
* @ngInject
*/
export default angular
.module('blocks.router', [])
.provider('RouterHelper', RouterHelper)
.name;
var angular = require('angular');
var utils = require('./../utils.js')
var X2JS = require("x2js");
var generalDataFilter = require('./helpers/generalDataFilter.js');
angular.module('Endev').service("$endevRest", ['$http','$interpolate','$q', function($http,$interpolate,$q){
function prependTransform(defaults, transform) {
// We can't guarantee that the transform transformation is an array
transform = angular.isArray(transform) ? transform : [transform];
// Append the new transformation to the defaults
return transform.concat(defaults);
}
return {
query: function(attrs,extra,callback) {
var from = attrs.from.slice(attrs.from.indexOf(":")+1);
var result = $q.defer();
if(attrs.parentLabel) {
var tmp = utils.valueOnPath(attrs.parentObject, from, true);
tmp = generalDataFilter(tmp,attrs);
if(callback && angular.isFunction(callback)) callback(tmp)
reset() {
Accounts.forgotPassword(this.credentials, this.$bindToContext((err) => {
if (err) {
this.error = err;
} else {
this.$state.go('parties');
}
}));
}
}
const name = 'password';
// create a module
export const PasswordNg1Module = angular.module(name, [
angularMeteor,
uiRouter
]);
export function registerPassword() {
PasswordNg1Module
.component(name, {
template,
controllerAs: name,
controller: Register
})
.config(config);
}
function config($stateProvider) {
'ngInject';
it("can be declared to any value", () => {
angular.module("foo", []).value("foo", 123);
angular.module("foo", []).value("foo", "str");
angular.module("foo", []).value("foo", {});
});
});
};
const promise = this.$http.get(this.RestUrlService.FEED_PROFILE_STATS_URL(this.model.id), {params: {'processingdttm': this.processingdttm}});
promise.then(successFn, errorFn);
return promise;
};
$onInit() {
this.processingDate = new Date(this.HiveService.getUTCTime(this.processingdttm));
this.getProfileStats();
}
}
angular.module(moduleName).controller('FeedProfileStatsController',
["$http", "FeedService", "RestUrlService", "HiveService", "BroadcastService", FeedProfileStatsController]);
angular.module(moduleName).directive('thinkbigFeedProfileStats', directive);
templateUrl: 'public/app/features/playlist/partials/playlist.html',
controllerAs: 'ctrl',
controller: 'PlaylistEditCtrl',
})
.when('/playlists/play/:id', {
template: '',
resolve: {
init: (playlistSrv, $route) => {
const playlistId = $route.current.params.id;
playlistSrv.start(playlistId);
},
},
});
}
angular.module('grafana.routes').config(grafanaRoutes);
const angular = require('angular');
const throttle = require('throttle-debounce').throttle;
const THREE = require('three');
angular.module('atlasDemo').directive( 'sceneCrosshair', [function () {
return {
restrict: 'EA',
scope: {},
templateUrl : 'ng-templates/sceneCrosshair.html',
controller: ['$scope', '$element', 'mainApp', 'firebaseView', function ( $scope, $element, mainApp, firebaseView) {
$scope.style = {
stroke : "white",
display : "none",
top : "0px",
left : "0px"
};
var canvas = $('#rendererFrame canvas'),
debouncedCommit = throttle(150, function () {
import saveComponent from './save.component';
const config = ($stateProvider) => {
'ngInject';
$stateProvider
.state('eggly.categories.bookmarks.create', {
url: '/bookmarks/create',
template: ''
})
.state('eggly.categories.bookmarks.edit', {
url: '/bookmarks/:bookmarkId/edit',
template: ''
});
};
let saveModule = angular.module('save', [
uiRouter
])
.config(config)
.component('save', saveComponent);
export default saveModule;