Ionic2 - Displaying project images on the UI

前端 未结 1 1691
余生分开走
余生分开走 2020-12-12 06:33

I have the following brand new project, created with:

$ ionic start MyIonic2Project sidemenu --v2

My question is very

1条回答
  •  甜味超标
    2020-12-12 06:55

    src/assets/ folder should contain all the resources. You can use any sub-folder depending on type of resource. During the build process everything in the src/assets is copied to www/assets.

    how the url of these images would look like?

    You have to give the path relative to your current file when it would be in www folder. It is generally ../assets/../filename if you are setting in your scss file.(This would end up as part of main.css within build folder). and ./assets/../filename in your html file.

    0 讨论(0)
提交回复
热议问题