将jsx透明化为js并将其捆绑在bundleconfig.json中

时间:2016-12-03 14:27:49

标签: asp.net-mvc reactjs reactjs.net

我试图在ASP.NET Core Applikation中设置一个ReactJS.NET项目并捆绑我的jsx文件,但它似乎比我预期的更难。现在我已经阅读了大量的文章,并浏览了他们网站上的documentation,但是当这个指南&#39;引导时,我并没有帮助我。仅适用于cs文件,我的是json文件:<TextView android:text="TextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_marginTop="14dp" android:id="@+id/Area" android:onClick="Onselection" android:layout_alignParentEnd="true" android:layout_alignParentStart="true" /> <fragment android:id="@+id/place_autocomplete_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment" android:layout_below="@+id/Area" android:layout_alignParentStart="true" /> 。我也试过this tutorial,但我没有帮助我。

当我进入public class test extends AppCompatActivity implements PlaceSelectionListener { private static final String LOG_TAG = "PlaceSelectionListener"; private static final LatLngBounds BOUNDS_MOUNTAIN_VIEW = new LatLngBounds( new LatLng(-85, -180), new LatLng(85, 180)); private static final int REQUEST_SELECT_PLACE = 1000; TextView locationtext ; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_testtttt); locationtext = (TextView) findViewById(R.id.Arear) ; PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment) getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment); autocompleteFragment.setOnPlaceSelectedListener(this); AutocompleteFilter typeFilter = new AutocompleteFilter.Builder() .setTypeFilter(AutocompleteFilter.TYPE_FILTER_ADDRESS) .build(); autocompleteFragment.setFilter(typeFilter); } public void Onselection(View v) { try { Intent intent = new PlaceAutocomplete.IntentBuilder (PlaceAutocomplete.MODE_OVERLAY) .setBoundsBias(BOUNDS_MOUNTAIN_VIEW) .build(testtttt.this); startActivityForResult(intent, REQUEST_SELECT_PLACE); } catch (GooglePlayServicesRepairableException | GooglePlayServicesNotAvailableException e) { e.printStackTrace(); } } @Override public void onPlaceSelected(Place place) { } @Override public void onError(Status status) { } - 文件时,我尝试给bundleconfig.json一个jsx值,然后我告诉我,该值需要是css或js。我必须以某种方式进行转换吗?我可以用另一种/更好的方式做到这一点,还是只是忘记在这个项目中捆绑我的文件?

希望有人能指出我正确的方向。

0 个答案:

没有答案