Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
302 views
in Technique[技术] by (71.8m points)

angular - Missing app.scss in ionic tabbed project using ionic 4

I created an ionic 4 tabbed project. It did not create the file /src/app/app.scss. I tried manually creating the file but it does not integrate into the project. Has the file been replaced with a different file name in ionic 4? Thank you.

Update #1

I found some information that the file should be called global.scss. I renamed the file that I had created from app.scss to global.scss. That did not help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I found the problem! First of all app.scss is now called global.scss in ionic 4. Also, the file global.scss already existed in another folder:

/src/global.scss

So I deleted the file I had created:

/src/app/global.scss

Another tip: If you want to know what global style file you are using, open the file angular.json and view the section:

"styles": [
              {
                "input": "src/theme/variables.scss"
              },
              {
                "input": "src/global.scss"
              }
            ]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...