A lightweight meteor-angular bridge, which only do angular bootstrap, nothing more.
mrt add angularite
angularite tries to be as small as possible.
It does only one simple thing: bootstrap angular.
Extendable with other addon packages.
- angular-ui-router
- angular-bootstrap
- spiderable-ui-router
- ...
- (consider writing you angular packages based on angularite)
- ...
So angularite is suitable for production:
- Choose packages depending on your needs.
- Will not waste precious loading time on JS code you never use.
Set the delimeter used in template interpolation. The default is [[
and ]]
.
Define an angular module and it's dependencies. Returns an angular module object.
Subsequent calls with same modname
will return the defined module object. So you can not re-define dependencies after module has been initialized, it's the same behavior as angular.module()
.
Override template delimeter in specific module.
var app = Angularite.module('myApp', [xxx', 'yyy']);
app.controller(...);
app.factory(...);
...
- You can define multiple modules, which is the recommended way coding in angular.
The best practise is make a weak
dependency on angularite and other bridges.
Package.on_use(function(api) {
api.use('angularite', 'client', {weak:true});
api.use('ngMeteor', 'client', {weak:true});
...
});
Then in your addon you can check which bridge is currently using:
if (typeof(Angularite) !== 'undefined') {
...
} else if (typeof(ngMeteor) !== 'undefined') {
...
}
So your package can work with both angularite and ngMeteor, thus not bound to any specific bridge implementation.