Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-couch-potato",
"version": "0.2.3",
"version": "0.2.4",
"homepage": "https://github.com/laurelnaiad/angular-couch-potato",
"main": [
"dist/angular-couch-potato.js"
Expand All @@ -19,12 +19,11 @@
"./*.gitignore",
"package.json"
],
"dependencies": {
},
"dependencies": {},
"devDependencies": {
"requirejs": "~2.1.8",
"angular-ui-router": "~0.2.0",
"angular": "~1.2.0",
"angular-route": "~1.2.0"
"requirejs": "^2.3.2",
"angular-ui-router": "^0.3.1",
"angular": "^1.5.8",
"angular-route": "^1.5.8"
}
}
26 changes: 24 additions & 2 deletions dist/angular-couch-potato.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! angular-couch-potato - v0.2.3 - 2014-11-06
/*! angular-couch-potato - v0.2.4 - 2016-09-23
* https://github.com/laurelnaiad/angular-couch-potato
* Copyright (c) 2013 Daphne Maddox;
* Copyright (c) 2016 Daphne Maddox;
* Uses software code originally found at https://github.com/szhanginrhythm/angular-require-lazyload
* Licensed MIT
*/
Expand Down Expand Up @@ -78,6 +78,7 @@
) {

var rootScope = null;
var compileProviderComponentWithContext = null;

//Expose each provider's functionality as single-argument functions.
//The component-definining functions that are passed as parameters
Expand Down Expand Up @@ -128,6 +129,16 @@
}
}

function registerComponent(component, apply) {
if (compileProviderComponentWithContext === null) {
compileProviderComponentWithContext = $compileProvider.component.bind($compileProvider);
}
compileProviderComponentWithContext.apply(null, component);
if (apply) {
rootScope.$apply();
}
}

function registerController(controller, apply) {
$controllerProvider.register.apply(null, controller);
if (apply) {
Expand Down Expand Up @@ -243,6 +254,7 @@
svc.registerService = registerService;
svc.registerFilter = registerFilter;
svc.registerDirective = registerDirective;
svc.registerComponent = registerComponent;
svc.registerController = registerController;
svc.registerDecorator = registerDecorator;
svc.registerProvider = registerProvider;
Expand Down Expand Up @@ -342,6 +354,16 @@
return app;
};

app.registerComponent = function(name, component) {
if (app.lazy) {
app.lazy.registerComponent([name, component]);
}
else {
app.component(name, component);
}
return app;
};

app.registerDecorator = function(name, decorator) {
if (app.lazy) {
app.lazy.registerDecorator([name, decorator]);
Expand Down
Loading