i have globalize-behaviour.html file:
<script> globalizebehavior = { // https://www.polymer-project.org/1.0/docs/devguide/behaviors.html#definining-behaviors i18n: function(key) { return key; } }; </script> i including file in other custom-elements this:
<link rel="import" href="../globalize-behavior/globalize-behavior.html"> and using (in global-element.html):
<script> (function() { polymer({ is: 'global-element', behaviors: [globalizebehavior], openaddtransdialog: function() {}, }); })(); </script> and, here's .jshintrc file:
{ "node": true, "browser": true, "esnext": true, "bitwise": true, "camelcase": true, "curly": true, "eqeqeq": true, "immed": true, "indent": 2, "latedef": true, "noarg": true, "quotmark": "single", "undef": true, "unused": true, "globals": { "wrap": true, "unwrap": true, "polymer": true, "platform": true, "page": true, "app": true } } i getting following error while running jshint:
globalize-behavior.html line 2 col 1 'globalizebehavior' not defined.
global-element.html line 104 col 17 'globalizebehavior' not defined.
how can fix this?
you add
"globals": { "globalizebehavior": true } or:
"predef": [ "globalizebehavior" ] to .jshintrc file?
Comments
Post a Comment