Results 1 to 2 of 2

Thread: How do I add a JS class to my app

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Connecticut
    Posts
    1,003
    Answers
    12

    Default How do I add a JS class to my app

    I have a component that is a wrapper around some google map logic. How can I add it to my application.

    thanks

    bruce

  2. #2
    Sencha Premium Member
    Join Date
    Jan 2013
    Posts
    27

    Default

    put the component, I assume is a .js file to folder, e.g. resources under your project. Then in Architect's Project Inspector Panel, select Resources, add a JS Resource, and point the path to where you put your component. Then, select Application, add a loader and put code like "mycomp: './resource/js/mycomponent'" in the paths so your application will load that file. Finally, you can use the component in your code like this: mycomp.mycomponent.amethod

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •