Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Scope function (method) vs component helper

$
0
0
What should one take into considerations when deciding using helper or function?

Is it ok to have the attribute (or method) in scope and helper with the same name?

  1. scope: {
  2.       count: 1

  3. },

  4. helpers: {
  5.       count: function(){
  6.             return this.count + 1
  7.       }
  8. }


Viewing all articles
Browse latest Browse all 3491

Trending Articles