I'm trying node.js for the first time and I'm liking it so far. I've made a simple little header for a web app. On the header there's a login button that has a dropdown with with two links; one for login and the other for sign up.
I'm using a very basic Angular data initialization instead of a controller. There's also a repeat to fill the list for the dropdown. I'm reading that initialization is rarely used but my needs are so basic that I'm wondering if I really need a controller.
Here's some of the code:
Keep in mind this is written in Jade (just in case you couldn't tell).
Basically, I'm wondering if there's some functionality I might be missing by not using a controller.
I'm using a very basic Angular data initialization instead of a controller. There's also a repeat to fill the list for the dropdown. I'm reading that initialization is rarely used but my needs are so basic that I'm wondering if I really need a controller.
Here's some of the code:
Code:
section.header-nav(ng-app="" ng-init="loginlist=['Login','Sign Up']")
#[button.login-button(type='button') Login #[ul #[li(ng-repeat="x in loginlist") #[{{ x }}]]]]
Basically, I'm wondering if there's some functionality I might be missing by not using a controller.
Comment