JavaScriptã§String.startsWithç¸å½ã¯ä½ãããã³ããã¼ã¯ã JavaScriptã«ã¯Javaã§è¨ãã¨ããã®String.startsWithããªãã§ããã¿ããªã©ããã£ã¦ãããã¨ããã¨ã if (str.indexOf('prefix') === 0) { console.log('prefix found'); } ã¿ãããªæãã®ã³ã¼ããããè¦ã¾ããAngularJSã®ã½ã¼ã¹ã§ãè¦ã¾ãããã§ããããã£ã¦è¯ãèããã¨ç¡é§ã§ããããindexOfã¨ããã®ã¯æååãæåããæå¾ã¾ã§ãªãã¦ãä¸è´ããä½ç½®ãæ¢ãã®ã§ããè¦ã¤ããã°ä¸çºã§ãããè¦ã¤ãããªããã°æå¾ã¾ã§è¡ã£ã¦-1ãè¿ãã¾ããæ¬æ¥ãprefixãå¤å®ããã®ãªãæåã ãæ¤æ»ããã°ããã®ã§ãã str.substring(0, 'prefix'.length) === 'prefix' ã¨ããæ¸ãæ¹ãè¦ã¾ãããããããã¾
{{#tags}}- {{label}}
{{/tags}}