{"id":6101,"date":"2014-04-13T02:23:36","date_gmt":"2014-04-13T02:23:36","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/13\/angularjs-is-complaining-about-an-unexpected-token-in-an-expression-when-i-try-to-use-a-string-why-collection-of-common-programming-errors\/"},"modified":"2014-04-13T02:23:36","modified_gmt":"2014-04-13T02:23:36","slug":"angularjs-is-complaining-about-an-unexpected-token-in-an-expression-when-i-try-to-use-a-string-why-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/13\/angularjs-is-complaining-about-an-unexpected-token-in-an-expression-when-i-try-to-use-a-string-why-collection-of-common-programming-errors\/","title":{"rendered":"angularjs is complaining about an unexpected token in an expression, when I try to use a string. Why?-Collection of common programming errors"},"content":{"rendered":"<p>I found the problem. Instead of <code>\"state.name==='index'\"<\/code>, I should have written <code>\"state.name=='index'\"<\/code>. pkoziowski.opensource was right, in that you can&#8217;t use conditional statements, but what they mean by that, is that you can&#8217;t use if statements, or any control flow statements for that matter, so you couldn&#8217;t do this:<\/p>\n<pre><code>o\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I found the problem. Instead of &#8220;state.name===&#8217;index'&#8221;, I should have written &#8220;state.name==&#8217;index'&#8221;. pkoziowski.opensource was right, in that you can&#8217;t use conditional statements, but what they mean by that, is that you can&#8217;t use if statements, or any control flow statements for that matter, so you couldn&#8217;t do this: o<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6101","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6101"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6101\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}