Components added to the page via bicker do not trigger the onInit and onDestroy functions. I see in other routers like angular-ui-router, there is code to specifically call these functions:
https://github.com/angular-ui/ui-router/blob/eab98462a6df5fd8a5001ae5e282a7e227ce010e/src/ng1/directives/viewDirective.ts#L408
Code to reproduce:
var app = angular.module('bicker_example', ['bicker_router']);
var testController = function(){
console.log('Construct');
this.$onInit = function(){
console.log('Init');
};
this.$onDestroy = function(){
console.log('Destroy!');
}
};
app.component('testComponent', {
templateUrl: 'test.html',
controller: testController
});
app.config(function (RouteProvider, ViewBindingsProvider) {
RouteProvider.registerUrl('/', { state: { view: { test: true }}});
ViewBindingsProvider.bind('main', [{
requiredState: ['view.test'],
component: 'testComponent'
}]);
});