##// END OF EJS Templates
Corrected method signatures
Corrected method signatures

File last commit:

r0:9cf129973079 default
r6:5683fe88e2a5 default
Show More
config.md
37 lines | 1003 B | text/x-minidsrc | MarkdownLexer
cin
initial commit
r0 ```ts
import Foo from "./Foo"
import Services from "./services";
export default config<Services>()
.service("foo", it => it
.lifetime("container")
.wants(
{ $ref: "bar", lazy: true, default: undefined },
"baz"
)
.factory((bar,baz) => new Foo(bar,baz))
)
.service("loginForm", it => it
.wants("authService")
.factory(authService => LoginForm({authService}))
)
.service("view", it => it
.wants(
{ $ref: "loginForm", lazy: true },
{ $ref: "mainForm", lazy: true, context: "new" },
"authService"
)
.factory((login, main, authService) => View({login, main, authService}))
)
.value("host", "localhost")
.done();
const View = ({login, main, authService}) => {
useModel(() => new ViewModel(authService));
return <Router>
<Route path="login" component={login}/>
<Route default component={main}/>
</Router>;
}
```