-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @janek515 The $onInit is always emitted and changing that is not recommended. The simple solution if to set an option to by-pass connection during the bootstrap sequence: beforeAll(PlatformTest.bootstrap(Server, {
mydb: {
disabled: true
}
}));
@Injectable()
class MyConnectionService {
@Constant("mydb.disabled", false)
disabled: boolean;
$onInit() {
if (!this.disabled) {
///....
}
}
} |
Beta Was this translation helpful? Give feedback.
Hello @janek515
The $onInit is always emitted and changing that is not recommended.
The simple solution if to set an option to by-pass connection during the bootstrap sequence: