not found in data context help me!!!

{fname} not found in data context,
{lname} not found in data context,
{email} not found in data context,
{password} not found in data context,

<JavaScript>

	var ROOT_URL = "127.0.0.1:8000/api/register";

	var Observable = require("FuseJS/Observable");

	var data = Observable(
			{fname: ""},
			{lname: ""},
			{password: ""},
			{email: ""});

	function apiFetch(path, options) {
		var url = encodeURI(ROOT_URL + path);

		if(options === undefined) {
			options = {};
		}
		
		// If a body is provided, serialize it as JSON and set the Content-Type header
		if(options.body !== undefined) {
			options = Object.assign({}, options, {
				body: JSON.stringify(options.body),
				headers: Object.assign({}, options.headers, {
					"Content-Type": "application/json"
				})
			});
		}
		
		// Fetch the resource and parse the response as JSON
		return fetch(url, options)
			.then(function(response) { return response.json(); });
	}

	function register(fname, lname, email, password) {
		return apiFetch("articles", {
			method: "POST",
			body: {
				fname: fname,
				lname: lname,
				email: email,
				password: password,
			}
		});
	}

	

	module.exports = {
		register: register,
		apiFetch: apiFetch,
		data: data,
	};

</JavaScript>


<ClientPanel Color="#FF7977">
	<TextInput Value="{lname}" Margin="0, 0, 89, 30" TextWrapping="NoWrap" TextAlignment="Center" Alignment="Center" PlaceholderText="Lname" PlaceholderColor="#FEFFFF" Opacity="0.386"></TextInput>
	<TextInput Value="{fname}" PlaceholderText="Fname" Alignment="Center" Margin="0, 20, 90, 0" PlaceholderColor="#FEFFFF" Opacity="0.386"></TextInput>

	<TextInput Value="{email}" PlaceholderText="Email" Alignment="Center" PlaceholderColor="#FEFFFF" Margin="0, 60, 99, 0" Opacity="0.386"></TextInput>
	
	<TextInput Value="{password}" Alignment="Center" PlaceholderColor="#FEFFFF" Margin="0, 108, 66, 0" PlaceholderText="Password" Opacity="0.386"></TextInput>
	

	<Button Clicked="{register}" Text="Register" Alignment="BottomCenter" Margin="0, 0, 0, 100" Color="#FEFFFF" Background="#FEFFFF" Width="130" Height="30"><Shadow Angle="70" />
	</Button>

</ClientPanel>

Dear Ganbayar,

I would suggest to add to module. exports, all those variables you are refering to from the .ux file, like:
lname: lname,
fname: fname
… and e.t.c, I would start with this.

But, must probably then you will reach the second problem, since the variable “data” you define as the multivalue Observable and there is cirtain specifics of getting values out of it, please refer to the page and video describing it:
https://www.fusetools.com/docs/fusejs/observable

Kind Regards,
Leonids

Please don’t create multiple forum threads with the same question. An answer has been provided in the other thread.