2014-11-07 6 views
5

Utilizzando Iron Router e layout, come possono essere aggiunte più linee a <head>? Ad esempio, aggiungendo il seguente codice per <head> ...Aggiungere linee a <head> quando si usano i layout di Iron Router

<meta charset="utf-8"> 
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> 
<meta name="description" content=""> 
<meta name="author" content=""> 
<link rel="shortcut icon" href="assets/img/favicon.png"> 

<title>My Title</title> 

<!-- Fonts from Google Fonts --> 
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,300,700' rel='stylesheet' type='text/css'> 

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> 
<!--[if lt IE 9]> 
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> 
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> 
<![endif]--> 

risposta

4

Basta avvolgere il codice html all'interno di <head> come si farebbe normalmente. Non metterlo in alcun modello.

<head> 

    <meta charset="utf-8"> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> 
    <meta name="description" content=""> 
    <meta name="author" content=""> 
    <link rel="shortcut icon" href="assets/img/favicon.png"> 

    <title>My Title</title> 

    <!-- Fonts from Google Fonts --> 
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,300,700' rel='stylesheet' type='text/css'> 

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> 
    <!--[if lt IE 9]> 
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> 
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> 
    <![endif]--> 

</head> 

Il router di ferro non interferisce con questo.

+0

Dove dovrebbe andare questa testa? Quale file? – Artem

+0

@Artem qualsiasi file .html sul lato client funzionerà. –

+0

Ho provato e non ha funzionato per me per 1.3 – Artem

Problemi correlati