Fork me on GitHub
#keechma
<
2019-07-06
>
Ahmed Hassan20:07:33

is :main component mandatory in application?

Ahmed Hassan20:07:11

what if I have Login component? which key does it refers to?

carkh20:07:46

yes why not

carkh20:07:12

you make the names up =)

Ahmed Hassan20:07:59

Problem is that it's not being rendered. Even when pipeline controller's :params function returns true.

carkh20:07:20

you need to have a main component

Ahmed Hassan20:07:33

(I am using fn instead of :params)

carkh20:07:38

which will in turn show the login component

carkh20:07:10

your app has at least 2 states, 1 show the login, 2 show the actual page

carkh20:07:24

both 1 and 2 are enclosed in the main component

carkh20:07:41

which will dispatch based on the route

carkh20:07:28

back to my counters test app, here is that main component

carkh20:07:10

see how it selects what to show based on the route

Ahmed Hassan20:07:42

Oh great, so every other component in app flows from :main.

carkh20:07:43

you would have :login and :main-page instead of my two counter pages

carkh20:07:56

that's how i do it anyways

Ahmed Hassan20:07:14

@carkh Thanks. Let me try it.

👍 4
carkh20:07:47

i don't want to publish that app, it looks more like a battleground than an app....so many tests were made in there =)

😃 4
Ahmed Hassan20:07:51

@carkh I'm going through similar phase.

carkh20:07:49

best way to learn !

❤️ 4