Very Basic Meteor Routing To Template -


उल्का 0.8.0.1 - डॉक्स से क्या मुझे समझा गया, यह न्यूनतम ऐप

  & lt ; शीर्ष & gt; & Lt; शीर्षक & gt; उल्का रूटिंग टेस्ट & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; {{& Gt; renderPage}} & lt; / body & gt; & lt; टेम्पलेट नाम = "हैलो" & gt; & Lt; h1 & gt; हैलो वर्ल्ड! & Lt; / h1 & gt; & Lt; / टेम्पलेट & gt;   

और

  Meteor.Router.add ({'/ hi': 'हैलो',});   

localhost: 3000 / hi पर हैलो नामित टेम्पलेट को लाने और प्रस्तुत करना चाहिए। इसके बजाय, हैलो को खाली एचटीएमएल (यानी उल्का हैडर लोड नहीं किया गया है) में प्रस्तुत किया जा रहा है।

मुझे क्या याद आ रहा है? < P>

लोहा-राउटर जोड़ें (-:

  एमआरटी लोहा-राउटर जोड़   

और इसे आज़माएं:

  राउटर.मैप (फ़ंक्शन () {this.route ('hi', {path: '/ hi', टेम्पलेट: 'हैलो'});}   

और

  & lt; body & gt; {{& gt; उपज}} & lt; / body & gt;    

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -