Code Monkey home page Code Monkey logo

davidmartinezros / bind-json-array-to-draggable-portlets Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 5.49 MB

Bind Json Array to Draggable Portlets: The component is an easy representation of a webpage structurate in draggable portlets binding with a json file. It could be useful for a notice portal or a webpage the need to interchange them content.

Home Page: https://plnkr.co/edit/REhfoeZ3CaoYOneY?preview

License: MIT License

JavaScript 56.33% TypeScript 33.12% HTML 4.38% CSS 6.04% Batchfile 0.13%
bind json draggable portlets angular7 angular

bind-json-array-to-draggable-portlets's Introduction

DESCRIPTION

The component is an easy representation of a webpage structurate in draggable portlets binding with a json file.

It could be useful for a notice portal or a webpage the need to interchange them content.

load bind json array to draggable portlets in an easy way with app-draggable-portlets-template

This project was generated with Angular CLI and is designed as a basic template combined with Angular.

You can find me at https://davidmartinezros.com or contact in the email [email protected]

youtube video

https://www.youtube.com/watch?v=UK95WlM-GMc

demo using the component

https://davidmartinezros.github.io/DraggablePortletsTemplateDemo/

how to use this component

You can use it as a component in your project adding the tag in your AppComponent, add the module AppDraggablePortletsTemplateModule and define the data json file.

Like this:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppDraggablePortletsTemplateModule } from 'app-draggable-portlets-template';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppDraggablePortletsTemplateModule
  ],
  bootstrap: [
    AppComponent
  ]
})
export class AppModule { }

Then, you can define the data json file that loads all portlets.

Like this:

{
    "columnsCount": 3,
    "columns": [
        {
            "portlets" : [
                {
                    "header": "Portlet header 1",
                    "content": "Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
                }
            ]
        },
        {
            "portlets" : [
                {
                    "header": "Portlet header 2",
                    "content": "Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
                },
                {
                    "header": "Portlet header 3",
                    "content": "Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
                }
            ]
        },
        {
            "portlets" : [
                {
                    "header": "Portlet header 4",
                    "content": "Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
                }
            ]
        }
    ]
    
}

Call the component into the html of the AppComponent with the route of your data json file:

<app-load-portlets configFile="/assets/json/data.json"></app-load-portlets>

Demo Example

You can find the demo here: https://davidmartinezros.com/portfolio-full-stack-developer-software-engineer/project/en/draggable-portlets-with-angular

bind-json-array-to-draggable-portlets's People

Contributors

davidmartinezros avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.