2016-08-21 8 views
0

私の流星アプリケーションでは、レイアウトで複数の歩留まりを使用しています。
レイアウトは次のようになります。そのテンプレートを使用する多くのルートがあるので、私は、ハードコーディングを防ぐためにfrontEndHeaderをレンダリングする機能を作成しrouter.coffeeで同じレイアウトのテンプレートをレンダリングするIronルータ機能

<template name="frontEnd"> 
    {{>yield "header"}} 
    {{>yield}} 
</template> 

とヘッダ

<template name="frontEndHeader"> 
    <div class="ui menu"> 
     <a class="active item" href="/">Home</a> 
     <a class="item" href="admin">Admin</a> 
     <div class="right menu"> 
      {{>searchPaste}} 
     </div> 
    </div> 
</template> 

renderFontEnd = (that, template)-> 
    that.layout 'frontEnd' 
    that.render template 
    that.render 'frontEndHeader', to : 'header' 

問題は、私は例えば、ルート定義するときにこれを渡す必要があるということです:
ここでは、関数の

Router.route '/',()-> renderFontEnd(@, 'mainUi') 

は私がすることを削除したいの「() - >」の前に関数を呼び出すと、どうすればこのことができますか?
私は、私は「だと思う それはエラーが表示されませんが、それは何でレンダリング(私はレイアウトにテキストを追加する場合、それはそれをレンダリングするが、それは収率がレンダリングされません)

renderFontEnd = (that, template)->(that=that, template=template)-> 
    that.layout 'frontEnd' 
    that.render template 
    that.render 'frontEndHeader', to : 'header' 

に機能を変更しようとしましたこれを間違ってやろうとしている。私renderFrontEnd機能に

console.log @, template 

の追加ヘルプ


編集

ため おかげで、私は

Window {speechSynthesis: SpeechSynthesis, caches: CacheStorage, localStorage: Storage, sessionStorage: Storage, webkitStorageInfo: DeprecatedStorageInfo…}Infinity: Infinity$: (selector, context)Accounts: AccountsClientAnalyserNode: AnalyserNode()AnimationEvent: AnimationEvent()AppBannerPromptResult: AppBannerPromptResult()ApplicationCache: ApplicationCache()ApplicationCacheErrorEvent: ApplicationCacheErrorEvent()Array: Array()ArrayBuffer: ArrayBuffer()Attr: Attr()Audio: HTMLAudioElement()AudioBuffer: AudioBuffer()AudioBufferSourceNode: AudioBufferSourceNode()AudioContext: AudioContext()AudioDestinationNode: AudioDestinationNode()AudioListener: AudioListener()AudioNode: AudioNode()AudioParam: AudioParam()AudioProcessingEvent: AudioProcessingEvent()Autoupdate: ObjectBarProp: BarProp()BatteryManager: BatteryManager()BeforeInstallPromptEvent: BeforeInstallPromptEvent()BeforeUnloadEvent: BeforeUnloadEvent()BiquadFilterNode: BiquadFilterNode()Blaze: ObjectBlob: Blob()BlobEvent: BlobEvent()Boolean: Boolean()Buffer: Buffer(arg)ByteLengthQueuingStrategy: ByteLengthQueuingStrategy()CDATASection: CDATASection()CSS: CSS()CSSFontFaceRule: CSSFontFaceRule()CSSGroupingRule: CSSGroupingRule()CSSImportRule: CSSImportRule()CSSKeyframeRule: CSSKeyframeRule()CSSKeyframesRule: CSSKeyframesRule()CSSMediaRule: CSSMediaRule()CSSNamespaceRule: CSSNamespaceRule()CSSPageRule: CSSPageRule()CSSRule: CSSRule()CSSRuleList: CSSRuleList()CSSStyleDeclaration: CSSStyleDeclaration()CSSStyleRule: CSSStyleRule()CSSStyleSheet: CSSStyleSheet()CSSSupportsRule: CSSSupportsRule()CSSViewportRule: CSSViewportRule()Cache: Cache()CacheStorage: CacheStorage()CanvasCaptureMediaStreamTrack: CanvasCaptureMediaStreamTrack()CanvasGradient: CanvasGradient()CanvasPattern: CanvasPattern()CanvasRenderingContext2D: CanvasRenderingContext2D()ChannelMergerNode: ChannelMergerNode()ChannelSplitterNode: ChannelSplitterNode()CharacterData: CharacterData()ClientRect: ClientRect()ClientRectList: ClientRectList()ClipboardEvent: ClipboardEvent()CloseEvent: CloseEvent()Comment: Comment()CompositionEvent: CompositionEvent()ConvolverNode: ConvolverNode()CountQueuingStrategy: CountQueuingStrategy()Credential: Credential()CredentialsContainer: CredentialsContainer()Crypto: Crypto()CryptoKey: CryptoKey()CustomEvent: CustomEvent()DDP: ObjectDOMError: DOMError()DOMException: DOMException()DOMImplementation: DOMImplementation()DOMParser: DOMParser()DOMStringList: DOMStringList()DOMStringMap: DOMStringMap()DOMTokenList: DOMTokenList()DataTransfer: DataTransfer()DataTransferItem: DataTransferItem()DataTransferItemList: DataTransferItemList()DataView: DataView()Date: Date(Y, M, D, h, m, s, ms)DelayNode: DelayNode()Deps: ObjectDeviceMotionEvent: DeviceMotionEvent()DeviceOrientationEvent: DeviceOrientationEvent()Document: Document()DocumentFragment: DocumentFragment()DocumentType: DocumentType()DragEvent: DragEvent()DynamicsCompressorNode: DynamicsCompressorNode()Element: Element()Error: Error()ErrorEvent: ErrorEvent()EvalError: EvalError()Event: Event()EventSource: EventSource()EventTarget: EventTarget()FastRender: ObjectFederatedCredential: FederatedCredential()File: File()FileError: FileError()FileList: FileList()FileReader: FileReader()Float32Array: Float32Array()Float64Array: Float64Array()FocusEvent: FocusEvent()FontFace: FontFace()FormData: FormData()Function: Function()GainNode: GainNode()Gamepad: Gamepad()GamepadButton: GamepadButton()GamepadEvent: GamepadEvent()HTML: ObjectHTMLAllCollection: HTMLAllCollection()HTMLAnchorElement: HTMLAnchorElement()HTMLAreaElement: HTMLAreaElement()HTMLAudioElement: HTMLAudioElement()HTMLBRElement: HTMLBRElement()HTMLBaseElement: HTMLBaseElement()HTMLBodyElement: HTMLBodyElement()HTMLButtonElement: HTMLButtonElement()HTMLCanvasElement: HTMLCanvasElement()HTMLCollection: HTMLCollection()HTMLContentElement: HTMLContentElement()HTMLDListElement: HTMLDListElement()HTMLDataListElement: HTMLDataListElement()HTMLDetailsElement: HTMLDetailsElement()HTMLDialogElement: HTMLDialogElement()HTMLDirectoryElement: HTMLDirectoryElement()HTMLDivElement: HTMLDivElement()HTMLDocument: HTMLDocument()HTMLElement: HTMLElement()HTMLEmbedElement: HTMLEmbedElement()HTMLFieldSetElement: HTMLFieldSetElement()HTMLFontElement: HTMLFontElement()HTMLFormControlsCollection: HTMLFormControlsCollection()HTMLFormElement: HTMLFormElement()HTMLFrameElement: HTMLFrameElement()HTMLFrameSetElement: HTMLFrameSetElement()HTMLHRElement: HTMLHRElement()HTMLHeadElement: HTMLHeadElement()HTMLHeadingElement: HTMLHeadingElement()HTMLHtmlElement: HTMLHtmlElement()HTMLIFrameElement: HTMLIFrameElement()HTMLImageElement: HTMLImageElement()HTMLInputElement: HTMLInputElement()HTMLKeygenElement: HTMLKeygenElement()HTMLLIElement: HTMLLIElement()HTMLLabelElement: HTMLLabelElement()HTMLLegendElement: HTMLLegendElement()HTMLLinkElement: HTMLLinkElement()HTMLMapElement: HTMLMapElement()HTMLMarqueeElement: HTMLMarqueeElement()HTMLMediaElement: HTMLMediaElement()HTMLMenuElement: HTMLMenuElement()HTMLMetaElement: HTMLMetaElement()HTMLMeterElement: HTMLMeterElement()HTMLModElement: HTMLModElement()HTMLOListElement: HTMLOListElement()HTMLObjectElement: HTMLObjectElement()HTMLOptGroupElement: HTMLOptGroupElement()HTMLOptionElement: HTMLOptionElement()HTMLOptionsCollection: HTMLOptionsCollection()HTMLOutputElement: HTMLOutputElement()HTMLParagraphElement: HTMLParagraphElement()HTMLParamElement: HTMLParamElement()HTMLPictureElement: HTMLPictureElement()HTMLPreElement: HTMLPreElement()HTMLProgressElement: HTMLProgressElement()HTMLQuoteElement: HTMLQuoteElement()HTMLScriptElement: HTMLScriptElement()HTMLSelectElement: HTMLSelectElement()HTMLShadowElement: HTMLShadowElement()HTMLSourceElement: HTMLSourceElement()HTMLSpanElement: HTMLSpanElement()HTMLStyleElement: HTMLStyleElement()HTMLTableCaptionElement: HTMLTableCaptionElement()HTMLTableCellElement: HTMLTableCellElement()HTMLTableColElement: HTMLTableColElement()HTMLTableElement: HTMLTableElement()HTMLTableRowElement: HTMLTableRowElement()HTMLTableSectionElement: HTMLTableSectionElement()HTMLTemplateElement: HTMLTemplateElement()HTMLTextAreaElement: HTMLTextAreaElement()HTMLTitleElement: HTMLTitleElement()HTMLTrackElement: HTMLTrackElement()HTMLUListElement: HTMLUListElement()HTMLUnknownElement: HTMLUnknownElement()HTMLVideoElement: HTMLVideoElement()Handlebars: ObjectHasAndBelongsToManyRelation: HasAndBelongsToManyRelation()HasManyRelation: HasManyRelation()HashChangeEvent: HashChangeEvent()Headers: Headers()History: History()IDBCursor: IDBCursor()IDBCursorWithValue: IDBCursorWithValue()IDBDatabase: IDBDatabase()IDBFactory: IDBFactory()IDBIndex: IDBIndex()IDBKeyRange: IDBKeyRange()IDBObjectStore: IDBObjectStore()IDBOpenDBRequest: IDBOpenDBRequest()IDBRequest: IDBRequest()IDBTransaction: IDBTransaction()IDBVersionChangeEvent: IDBVersionChangeEvent()IIRFilterNode: IIRFilterNode()IdleDeadline: IdleDeadline()Image: HTMLImageElement()ImageBitmap: ImageBitmap()ImageData: ImageData()InputDeviceCapabilities: InputDeviceCapabilities()Int8Array: Int8Array()Int16Array: Int16Array()Int32Array: Int32Array()IntersectionObserver: IntersectionObserver()IntersectionObserverEntry: IntersectionObserverEntry()Intl: ObjectIron: ObjectJSON: JSONKeyboardEvent: KeyboardEvent()LaunchScreen: ObjectLocation: Location()MIDIAccess: MIDIAccess()MIDIConnectionEvent: MIDIConnectionEvent()MIDIInput: MIDIInput()MIDIInputMap: MIDIInputMap()MIDIMessageEvent: MIDIMessageEvent()MIDIOutput: MIDIOutput()MIDIOutputMap: MIDIOutputMap()MIDIPort: MIDIPort()Map: Map()Math: MathMediaDevices: MediaDevices()MediaElementAudioSourceNode: MediaElementAudioSourceNode()MediaEncryptedEvent: MediaEncryptedEvent()MediaError: MediaError()MediaKeyMessageEvent: MediaKeyMessageEvent()MediaKeySession: MediaKeySession()MediaKeyStatusMap: MediaKeyStatusMap()MediaKeySystemAccess: MediaKeySystemAccess()MediaKeys: MediaKeys()MediaList: MediaList()MediaQueryList: MediaQueryList()MediaQueryListEvent: MediaQueryListEvent()MediaRecorder: MediaRecorder()MediaSource: MediaSource()MediaStreamAudioDestinationNode: MediaStreamAudioDestinationNode()MediaStreamAudioSourceNode: MediaStreamAudioSourceNode()MediaStreamEvent: MediaStreamEvent()MediaStreamTrack: MediaStreamTrack()MessageChannel: MessageChannel()MessageEvent: MessageEvent()MessagePort: MessagePort()Meteor: ObjectMimeType: MimeType()MimeTypeArray: MimeTypeArray()Minimongoid: Minimongoid(attr, parent, is_new)Mongo: ObjectMouseEvent: MouseEvent()MutationEvent: MutationEvent()MutationObserver: MutationObserver()MutationRecord: MutationRecord()NaN: NaNNamedNodeMap: NamedNodeMap()Navigator: Navigator()Node: Node()NodeFilter: NodeFilter()NodeIterator: NodeIterator()NodeList: NodeList()Notification: Notification()Number: Number()Object: Object()OfflineAudioCompletionEvent: OfflineAudioCompletionEvent()OfflineAudioContext: OfflineAudioContext()Option: HTMLOptionElement()OscillatorNode: OscillatorNode()Package: ObjectPageTransitionEvent: PageTransitionEvent()PasswordCredential: PasswordCredential()Paste: Paste()Path2D: Path2D()Performance: Performance()PerformanceEntry: PerformanceEntry()PerformanceMark: PerformanceMark()PerformanceMeasure: PerformanceMeasure()PerformanceNavigation: PerformanceNavigation()PerformanceObserver: PerformanceObserver()PerformanceObserverEntryList: PerformanceObserverEntryList()PerformanceResourceTiming: PerformanceResourceTiming()PerformanceTiming: PerformanceTiming()PeriodicWave: PeriodicWave()PermissionStatus: PermissionStatus()Permissions: Permissions()Plugin: Plugin()PluginArray: PluginArray()PopStateEvent: PopStateEvent()Presentation: Presentation()PresentationAvailability: PresentationAvailability()PresentationConnection: PresentationConnection()PresentationConnectionAvailableEvent: PresentationConnectionAvailableEvent()PresentationConnectionCloseEvent: PresentationConnectionCloseEvent()PresentationRequest: PresentationRequest()ProcessingInstruction: ProcessingInstruction()ProgressEvent: ProgressEvent()Promise: Promise()PromiseRejectionEvent: PromiseRejectionEvent()Proxy: Proxy()PushManager: PushManager()PushSubscription: PushSubscription()RTCCertificate: RTCCertificate()RTCIceCandidate: RTCIceCandidate()RTCSessionDescription: RTCSessionDescription()RadioNodeList: RadioNodeList()Range: Range()RangeError: RangeError()ReactiveVar: (initialValue, equalsFunc)ReadableStream: ReadableStream()ReferenceError: ReferenceError()Reflect: ObjectRegExp: RegExp()Relation: Relation()Reload: ObjectRequest: Request()Response: Response()Roles: ObjectRouteController:()Router: router(req, res, next)SVGAElement: SVGAElement()SVGAngle: SVGAngle()SVGAnimateElement: SVGAnimateElement()SVGAnimateMotionElement: SVGAnimateMotionElement()SVGAnimateTransformElement: SVGAnimateTransformElement()SVGAnimatedAngle: SVGAnimatedAngle()SVGAnimatedBoolean: SVGAnimatedBoolean()SVGAnimatedEnumeration: SVGAnimatedEnumeration()SVGAnimatedInteger: SVGAnimatedInteger()SVGAnimatedLength: SVGAnimatedLength()SVGAnimatedLengthList: SVGAnimatedLengthList()SVGAnimatedNumber: SVGAnimatedNumber()SVGAnimatedNumberList: SVGAnimatedNumberList()SVGAnimatedPreserveAspectRatio: SVGAnimatedPreserveAspectRatio()SVGAnimatedRect: SVGAnimatedRect()SVGAnimatedString: SVGAnimatedString()SVGAnimatedTransformList: SVGAnimatedTransformList()SVGAnimationElement: SVGAnimationElement()SVGCircleElement: SVGCircleElement()SVGClipPathElement: SVGClipPathElement()SVGComponentTransferFunctionElement: SVGComponentTransferFunctionElement()SVGCursorElement: SVGCursorElement()SVGDefsElement: SVGDefsElement()SVGDescElement: SVGDescElement()SVGDiscardElement: SVGDiscardElement()SVGElement: SVGElement()SVGEllipseElement: SVGEllipseElement()SVGFEBlendElement: SVGFEBlendElement()SVGFEColorMatrixElement: SVGFEColorMatrixElement()SVGFEComponentTransferElement: SVGFEComponentTransferElement()SVGFECompositeElement: SVGFECompositeElement()SVGFEConvolveMatrixElement: SVGFEConvolveMatrixElement()SVGFEDiffuseLightingElement: SVGFEDiffuseLightingElement()SVGFEDisplacementMapElement: SVGFEDisplacementMapElement()SVGFEDistantLightElement: SVGFEDistantLightElement()SVGFEDropShadowElement: SVGFEDropShadowElement()SVGFEFloodElement: SVGFEFloodElement()SVGFEFuncAElement: SVGFEFuncAElement()SVGFEFuncBElement: SVGFEFuncBElement()SVGFEFuncGElement: SVGFEFuncGElement()SVGFEFuncRElement: SVGFEFuncRElement()SVGFEGaussianBlurElement: SVGFEGaussianBlurElement()SVGFEImageElement: SVGFEImageElement()SVGFEMergeElement: SVGFEMergeElement()SVGFEMergeNodeElement: SVGFEMergeNodeElement()SVGFEMorphologyElement: SVGFEMorphologyElement()SVGFEOffsetElement: SVGFEOffsetElement()SVGFEPointLightElement: SVGFEPointLightElement()SVGFESpecularLightingElement: SVGFESpecularLightingElement()SVGFESpotLightElement: SVGFESpotLightElement()SVGFETileElement: SVGFETileElement()SVGFETurbulenceElement: SVGFETurbulenceElement()SVGFilterElement: SVGFilterElement()SVGForeignObjectElement: SVGForeignObjectElement()SVGGElement: SVGGElement()SVGGeometryElement: SVGGeometryElement()SVGGradientElement: SVGGradientElement()SVGGraphicsElement: SVGGraphicsElement()SVGImageElement: SVGImageElement()SVGLength: SVGLength()SVGLengthList: SVGLengthList()SVGLineElement: SVGLineElement()SVGLinearGradientElement: SVGLinearGradientElement()SVGMPathElement: SVGMPathElement()SVGMarkerElement: SVGMarkerElement()SVGMaskElement: SVGMaskElement()SVGMatrix: SVGMatrix()SVGMetadataElement: SVGMetadataElement()SVGNumber: SVGNumber()SVGNumberList: SVGNumberList()SVGPathElement: SVGPathElement()SVGPatternElement: SVGPatternElement()SVGPoint: SVGPoint()SVGPointList: SVGPointList()SVGPolygonElement: SVGPolygonElement()SVGPolylineElement: SVGPolylineElement()SVGPreserveAspectRatio: SVGPreserveAspectRatio()SVGRadialGradientElement: SVGRadialGradientElement()SVGRect: SVGRect()SVGRectElement: SVGRectElement()SVGSVGElement: SVGSVGElement()SVGScriptElement: SVGScriptElement()SVGSetElement: SVGSetElement()SVGStopElement: SVGStopElement()SVGStringList: SVGStringList()SVGStyleElement: SVGStyleElement()SVGSwitchElement: SVGSwitchElement()SVGSymbolElement: SVGSymbolElement()SVGTSpanElement: SVGTSpanElement()SVGTextContentElement: SVGTextContentElement()SVGTextElement: SVGTextElement()SVGTextPathElement: SVGTextPathElement()SVGTextPositioningElement: SVGTextPositioningElement()SVGTitleElement: SVGTitleElement()SVGTransform: SVGTransform()SVGTransformList: SVGTransformList()SVGUnitTypes: SVGUnitTypes()SVGUseElement: SVGUseElement()SVGViewElement: SVGViewElement()SVGViewSpec: SVGViewSpec()SVGZoomEvent: SVGZoomEvent()Screen: Screen()ScreenOrientation: ScreenOrientation()ScriptProcessorNode: ScriptProcessorNode()SecurityPolicyViolationEvent: SecurityPolicyViolationEvent()Selection: Selection()ServiceWorker: ServiceWorker()ServiceWorkerContainer: ServiceWorkerContainer()ServiceWorkerMessageEvent: ServiceWorkerMessageEvent()ServiceWorkerRegistration: ServiceWorkerRegistration()Set: Set()ShadowRoot: ShadowRoot()SharedWorker: SharedWorker()SiteBoundCredential: SiteBoundCredential()SourceBuffer: SourceBuffer()SourceBufferList: SourceBufferList()Spacebars: ObjectSpeechSynthesisEvent: SpeechSynthesisEvent()SpeechSynthesisUtterance: SpeechSynthesisUtterance()Storage: Storage()StorageEvent: StorageEvent()String: String()StyleSheet: StyleSheet()StyleSheetList: StyleSheetList()SubsManager: (options)SubtleCrypto: SubtleCrypto()Symbol: Symbol()SyncManager: SyncManager()SyntaxError: SyntaxError()Template: (viewName, renderFunction)Text: Text()TextDecoder: TextDecoder()TextEncoder: TextEncoder()TextEvent: TextEvent()TextMetrics: TextMetrics()TextTrack: TextTrack()TextTrackCue: TextTrackCue()TextTrackCueList: TextTrackCueList()TextTrackList: TextTrackList()TimeRanges: TimeRanges()Touch: Touch()TouchEvent: TouchEvent()TouchList: TouchList()TrackEvent: TrackEvent()Tracker: ObjectTransitionEvent: TransitionEvent()TreeWalker: TreeWalker()TypeError: TypeError()UI: ObjectUIEvent: UIEvent()URIError: URIError()URL: URL()URLSearchParams: URLSearchParams()Uint8Array: Uint8Array()Uint8ClampedArray: Uint8ClampedArray()Uint16Array: Uint16Array()Uint32Array: Uint32Array()VTTCue: VTTCue()ValidityState: ValidityState()WaveShaperNode: WaveShaperNode()WeakMap: WeakMap()WeakSet: WeakSet()WebApp: ObjectWebGLActiveInfo: WebGLActiveInfo()WebGLBuffer: WebGLBuffer()WebGLContextEvent: WebGLContextEvent()WebGLFramebuffer: WebGLFramebuffer()WebGLProgram: WebGLProgram()WebGLRenderbuffer: WebGLRenderbuffer()WebGLRenderingContext: WebGLRenderingContext()WebGLShader: WebGLShader()WebGLShaderPrecisionFormat: WebGLShaderPrecisionFormat()WebGLTexture: WebGLTexture()WebGLUniformLocation: WebGLUniformLocation()WebKitAnimationEvent: AnimationEvent()WebKitCSSMatrix: WebKitCSSMatrix()WebKitMutationObserver: MutationObserver()WebKitTransitionEvent: TransitionEvent()WebSocket: WebSocket()WheelEvent: WheelEvent()Window: Window()Worker: Worker()XMLDocument: XMLDocument()XMLHttpRequest: XMLHttpRequest()XMLHttpRequestEventTarget: XMLHttpRequestEventTarget()XMLHttpRequestUpload: XMLHttpRequestUpload()XMLSerializer: XMLSerializer()XPathEvaluator: XPathEvaluator()XPathExpression: XPathExpression()XPathResult: XPathResult()XSLTProcessor: XSLTProcessor()_: (obj)__coffeescriptShare: Object__core-js_shared__: Object__init_fast_render: undefined__meteor_runtime_config__: Objectalert: alert()applicationCache: ApplicationCacheatob: atob()blur:()btoa: btoa()caches: CacheStoragecancelAnimationFrame: cancelAnimationFrame()cancelIdleCallback: cancelIdleCallback()captureEvents: captureEvents()chrome: ObjectclearInterval: clearInterval()clearTimeout: clearTimeout()clientInformation: Navigatorclose:()closed: falseconfirm: confirm()console: Objectcore: ObjectcreateImageBitmap: createImageBitmap()crypto: CryptodecodeURI: decodeURI()decodeURIComponent: decodeURIComponent()defaultStatus: ""defaultstatus: ""devicePixelRatio: 1document: documentencodeURI: encodeURI()encodeURIComponent: encodeURIComponent()escape: escape()eval: eval()event: undefinedexternal: Objectfetch: fetch()find: find()focus:()frameElement: nullframes: WindowgetComputedStyle: getComputedStyle()getMatchedCSSRules: getMatchedCSSRules()getSelection: getSelection()global: Windowhistory: HistoryindexedDB: IDBFactoryinnerHeight: 925innerWidth: 1563isFinite: isFinite()isNaN: isNaN()isSecureContext: truejQuery: (selector, context)jQuery1112005778395572585193: Objectlanguage: language()length: 0localStorage: Storagelocation: Locationlocationbar: BarPropmatchMedia: matchMedia()menubar: BarPropmeteorBabelHelpers: ObjectmeteorEnv: ObjectmeteorInstall: install(tree, options)moveBy: moveBy()moveTo: moveTo()name: ""navigator: NavigatoroffscreenBuffering: trueonabort: nullonanimationend: nullonanimationiteration: nullonanimationstart: nullonbeforeunload: nullonblur: nulloncancel: nulloncanplay: nulloncanplaythrough: nullonchange: nullonclick: nullonclose: nulloncontextmenu: nulloncuechange: nullondblclick: nullondevicemotion: nullondeviceorientation: nullondeviceorientationabsolute: nullondrag: nullondragend: nullondragenter: nullondragleave: nullondragover: nullondragstart: nullondrop: nullondurationchange: nullonemptied: nullonended: nullonerror: nullonfocus: nullonhashchange: nulloninput: nulloninvalid: nullonkeydown: nullonkeypress: nullonkeyup: nullonlanguagechange: nullonload: nullonloadeddata: nullonloadedmetadata: nullonloadstart: nullonmessage: nullonmousedown: nullonmouseenter: nullonmouseleave: nullonmousemove: nullonmouseout: nullonmouseover: nullonmouseup: nullonmousewheel: nullonoffline: nullononline: nullonpagehide: nullonpageshow: nullonpause: nullonplay: nullonplaying: nullonpopstate: nullonprogress: nullonratechange: nullonrejectionhandled: nullonreset: nullonresize: nullonscroll: nullonsearch: nullonseeked: nullonseeking: nullonselect: nullonshow: nullonstalled: nullonstorage: nullonsubmit: nullonsuspend: nullontimeupdate: nullontoggle: nullontransitionend: nullonunhandledrejection: nullonunload: nullonvolumechange: nullonwaiting: nullonwebkitanimationend: nullonwebkitanimationiteration: nullonwebkitanimationstart: nullonwebkittransitionend: nullonwheel: nullopen: open()openDatabase: openDatabase()opener: nullouterHeight: 1015outerWidth: 1920pageXOffset: 0pageYOffset: 0parent: WindowparseFloat: parseFloat()parseInt: parseInt()performance: Performancepersonalbar: BarProppostMessage:()print: print()process: Objectprompt: prompt()releaseEvents: releaseEvents()requestAnimationFrame: requestAnimationFrame()requestIdleCallback: requestIdleCallback()require: require(id)resizeBy: resizeBy()resizeTo: resizeTo()screen: ScreenscreenLeft: 0screenTop: 29screenX: 0screenY: 29scroll: scroll()scrollBy: scrollBy()scrollTo: scrollTo()scrollX: 0scrollY: 0scrollbars: BarPropself: WindowsessionStorage: StoragesetInterval: setInterval()setTimeout: setTimeout()speechSynthesis: SpeechSynthesisstatus: ""statusbar: BarPropstop: stop()styleMedia: StyleMediatoolbar: BarProptop: Windowundefined: undefinedunescape: unescape()webkitAudioContext: AudioContext()webkitCancelAnimationFrame: webkitCancelAnimationFrame()webkitCancelRequestAnimationFrame: webkitCancelRequestAnimationFrame()webkitIDBCursor: IDBCursor()webkitIDBDatabase: IDBDatabase()webkitIDBFactory: IDBFactory()webkitIDBIndex: IDBIndex()webkitIDBKeyRange: IDBKeyRange()webkitIDBObjectStore: IDBObjectStore()webkitIDBRequest: IDBRequest()webkitIDBTransaction: IDBTransaction()webkitIndexedDB: IDBFactorywebkitMediaStream: MediaStream()webkitOfflineAudioContext: OfflineAudioContext()webkitRTCPeerConnection: RTCPeerConnection()webkitRequestAnimationFrame: webkitRequestAnimationFrame()webkitRequestFileSystem: webkitRequestFileSystem()webkitResolveLocalFileSystemURL: webkitResolveLocalFileSystemURL()webkitSpeechGrammar: SpeechGrammar()webkitSpeechGrammarList: SpeechGrammarList()webkitSpeechRecognition: SpeechRecognition()webkitSpeechRecognitionError: SpeechRecognitionError()webkitSpeechRecognitionEvent: SpeechRecognitionEvent()webkitStorageInfo: DeprecatedStorageInfowebkitURL: URL()window: Window__proto__: Window "mainUi" 
+0

今後、本当に必要なものに質問を簡略化することを検討してください。この場合、実際にあなたの質問は、(Javascript/Coffeescriptで)それを呼び出すことなく、与えられたパラメータを持つ関数のバージョンを作成する方法ですか?*とiron-routerやmeteor自体とは関係ありません。 – Waiski

答えて

0

を得たブラウザコンソールで、私は100%確実ではありませんよあなたの質問を理解していますが、それはあなたが探しているようですFunction.prototype.bind() 。与えられたthisコンテキストとオプションでいくつかのパラメータを持つ関数のバージョンを返します。 bindが正しいthisコンテキストを供給しているので

renderFontEnd = (template)-> 
    @layout 'frontEnd' 
    @render template 
    @render 'frontEndHeader', to : 'header' 

:今、あなたはこのようなあなたのrenderFrontEnd機能を変更することができ

Router.route '/', renderFontEnd.bind(@, 'mainUi') 

:あなたのケースでは、このようなバウンド関数を作成することができます。

+0

助けてくれてありがとう。ごめんなさい、申し訳ありませんが、私はすべてが必要だと言いたかったのですが、私はずっと言っていました –

+0

今私はそれを試して、それがうまくいかないようにします –

+0

私はその流星に厳密に関係していると思います –

関連する問題