470,596 Members | 1,608 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,596 developers. It's quick & easy.

Are node.js controllers essential?

97 64KB
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:

Expand|Select|Wrap|Line Numbers
  1. section.header-nav(ng-app="" ng-init="loginlist=['Login','Sign Up']")
  2.   #[button.login-button(type='button') Login #[ul #[li(ng-repeat="x in loginlist") #[{{ x }}]]]]
  3.  
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.
Sep 25 '15 #1
2 1269
madankarmukta
308 256MB
As per my understanding and knowledge , yeah they are essential, as they represent a data along with some functionalities to implement like sign up, authentication and authorization.
Sep 25 '15 #2
tdrsam
97 64KB
Ok, Thanks. I'll get around to making some better functionality soon.
Sep 25 '15 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by pillepop2003 | last post: by
kovik
reply views Thread by kovik | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.