iron-meteor / iron-controller Goto Github PK
View Code? Open in Web Editor NEWController class for dynamic layouts.
License: MIT License
Controller class for dynamic layouts.
License: MIT License
I want to be able to use an Iron controller to manage pagination variables for a large collection I'm subscribing to. I'm managing the pageNumber/pageSize in IronController state variables but I haven't found a reliable way to initialize these variables BEFORE the subscription request is made from client to server (I want to pass pageNumber and pageSize into the subscription request). None of the hooks seem to get called before the subscriptions hook.
Any ideas on where I can initialize controller state variables for early access? If I place them in the subscriptions function then they keep getting reset back to their original values....
Since these are still placeholders for a possible upcoming feature, maybe we shouldn't break execution here by throwing exceptions/errors but instead just a WARN
or NOTICE
? It seems people are running into this usually by not properly configuring which parts of the code has to execute only on client and/or server and there is no documentation part that warns against this.
Hi @cmather
Love to try out this package, but no iron-core package published yet.
I tried to update to iron:[email protected]
but it fails, related to iron:controller
.
So I tried to update it individually, whcih failed too. So I set up this test project:
$ meteor create ic-update
ic-update: created.
To run your new app:
cd ic-update
meteor
$ cd ic-update/
/ic-update$ meteor add iron:[email protected]
Could not satisfy all the specified constraints:
Error: conflict: constraints on iron:controller cannot be satisfied.
Constraints come from:
<top level>
[Moved from https://github.com/iron-meteor/iron-router/issues/911]
For example
SomeController = RouteController.extend({
template: 'myTemplate',
data: function () { return SomeCollection.findOne(); },
waitOn: function() { ... }
});
SomeController.events({
'submit #my-form': function(evt, tpl){
// this.data() works, tpl.data is undefined
console.log(this.data(), tpl.data);
}
});
Template.myTemplate.events({
'submit #my-form': function(evt, tpl){
// tpl.data is correct
console.log(tpl.data);
}
})
Maybe this is a bug, maybe intended?
I think its the use of forEach on line 43 of wait_list.js
Did a bit of digging and I don't believe IE8 supports forEach and so the routing all appears to fall over.
Behind a corporate proxy so can't use meteor add directly, this repo is behind?
Get following error when installed manually with all of the iron-router packages.
TypeError: Object [object Object] has no method '_setLookupHost'
at [object Object].Controller (packages/iron:controller/lib/controller.js:25:1)
at new Controller.extend.constructor (packages/iron:router/lib/route_controller.js:14:1)
at [object Object].ctor (packages/iron:core/lib/iron_core.js:88:1)
at Function.Router.createController (packages/iron:router/lib/router.js:201:1)
at Function.Router.dispatch (packages/iron:router/lib/router_server.js:39:1)
at Object.router (packages/iron:router/lib/router.js:15:1)
FYI changed code in package.js to
Package.describe({
summary: 'Controller class for dynamic layouts.',
name: 'iron:controller',
version: '1.0.8',
git: 'https://github.com/eventedmind/iron-controller.git'
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.