अंगुलर 2 के लिए न्यूब में Google फ़ॉन्ट शामिल करें।कोणीय 2 + उल्का अनुप्रयोग
मेरे ऐप में Google फ़ॉन्ट कैसे शामिल करें। --app.ts
| | अनुप्रयोग संरचना
ग्राहक
है --main.ts
| --index.html
IndexFile.html
<head></head>
<body style="font-family: 'Montserrat', sans-serif;">
<div class="container-fluid">
<app-start>Loading...</app-start>
</div>
</body>
हेड टैग
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
में
शामिल लिंक लेकिन कोई प्रभाव नहीं हुआ है, भी ग्राहक फ़ोल्डर (font.js) और डाला कोड
Meteor.startup(function() {
WebFontConfig = {
google: { families: [ 'Montserrat::latin' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
})
लेकिन कोई प्रभाव में एक जे एस फ़ाइल बनाई।
@import के उपयोग द्वारा
common_style.css फ़ाइल में इस कोड है जो मैं सार्वजनिक फ़ोल्डर में रखा सम्मिलित किया गया
आप सीएसएस में फ़ॉन्ट परिवार शामिल है पर शैली मिल गया को शामिल किया है? – Rudy
मैंने बॉडी टैग –
अजीब के अंदर इनलाइन सीएसएस को शामिल किया है, सिर में लिंक काम करना चाहिए। क्योंकि मैं इस तरह से उपयोग कर रहा हूं, यह ठीक से काम कर रहा है। –