Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { onLoad } from 'ember-runtime/system/lazy_load';
import RoutingService from 'ember-routing/services/routing';
onLoad('Ember.Application', function(Application) {
Application.initializer({
name: 'routing-service',
initialize(registry) {
// Register the routing service...
registry.register('service:-routing', RoutingService);
// Then inject the app router into it
registry.injection('service:-routing', 'router', 'router:main');
}
});
});
import { onLoad } from "ember-runtime/system/lazy_load";
var name = 'deferReadiness in `testing` mode';
onLoad('Ember.Application', function(Application) {
if (!Application.initializers[name]) {
Application.initializer({
name: name,
initialize(registry, application) {
if (application.testing) {
application.deferReadiness();
}
}
});
}
});
function registerComponentLookup(container) {
container.register('component-lookup:main', ComponentLookup);
}
/*
We tie this to application.load to ensure that we've at least
attempted to bootstrap at the point that the application is loaded.
We also tie this to document ready since we're guaranteed that all
the inline templates are present at this point.
There's no harm to running this twice, since we remove the templates
from the DOM after processing.
*/
onLoad('Ember.Application', function(Application) {
Application.initializer({
name: 'domTemplates',
initialize: _bootstrap
});
Application.initializer({
name: 'registerComponentLookup',
after: 'domTemplates',
initialize: registerComponentLookup
});
});
export default bootstrap;
import { onLoad } from "ember-runtime/system/lazy_load";
import linkToComponent from "ember-routing-views/views/link";
onLoad('Ember.Application', function(Application) {
Application.initializer({
name: 'link-to-component',
initialize(registry) {
registry.register('component:-link-to', linkToComponent);
}
});
});
import { onLoad } from "ember-runtime/system/lazy_load";
import TextField from "ember-views/views/text_field";
import TextArea from "ember-views/views/text_area";
import Checkbox from "ember-views/views/checkbox";
import LegacyEachView from "ember-views/views/legacy_each_view";
onLoad('Ember.Application', function(Application) {
Application.initializer({
name: 'ember-views-components',
initialize(registry) {
registry.register('component:-text-field', TextField);
registry.register('component:-text-area', TextArea);
registry.register('component:-checkbox', Checkbox);
registry.register('view:-legacy-each', LegacyEachView);
}
});
});