Should web components be placed under the Internet folder?

Is the goal to put web components in a folder web

somewhere or in a folder lib

?

I am asking because I am not sure and this has not been mentioned as far as I can tell.

+3


source to share


2 answers


Place your components in lib directory.

lib/
  control1.html
  control2.html
  control3.html

      

Let's say you configure your file pubspec.yaml

and name your package "my_controls".



name: my_controls
dependencies:
  html5lib: '>=0.3.1+2'
  web_ui: '>=0.3.2'

      

Since your project now defines a package, you can reference files in the lib directory as:

<link rel="components" href="packages/my_controls/control1.html">
<link rel="components" href="packages/my_controls/control2.html">
<link rel="components" href="packages/my_controls/control3.html">

      

+2


source


You can point to components:

<link rel="components" href="component/ui/login.html">

      



and in this case your components are in web / component / and in web / component / ui / you have login.html file

+1


source







All Articles