Skip to content

Contribute : how to run FancyTree with Angular 4 #776

@mojo2405

Description

@mojo2405

after few days of experiencing I managed to run perfectly FancyTree on angular 4.
You should add it to the manual.

  1. install jQuery and Fancytree via npm : npm install jquery jquery.fancytree
  2. install jQuery typings : npm install --save @types/jquery
  3. include jquery and fancytree in scripts array inside .angular-cli.json . e.g. :
    "scripts": [
    "../node_modules/jquery/dist/jquery.min.js",
    "../node_modules/jquery.fancytree/dist/jquery.fancytree-all-deps.min.js"
    ]
  4. include fancytree style inside styles array inside .angular-cli.json . e.g. :
    "styles": [
    "../node_modules/jquery.fancytree/dist/skin-win8/ui.fancytree.min.css"
    ],
  5. add jquery and fancytree to types array inside tsconfig.app.json file . e.g. :
    "compilerOptions": {
    ...
    "types": ["jquery","jquery.fancytree"]
    }
  6. add fancytree html to html componnent. e.g :
  • Root node 1
    • Child node 1
    • Child node 2
7. add jquery fancytree to you typescript file . e.g. : ngOnInit() { $('#tree').fancytree();

}

I'm sure this will help the comunity and I hope this is good contribution.

br.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions