Looking for an angular split pane library that is built exclusively for AngularJS without any reliance on other frameworks?

Is there a split-pane library available that can enable me to display 2 tables on a screen and allow users to drag the divider in the middle to adjust the sizes of each table?

I have come across libraries such as the shagstrom one that offer this functionality, but I prefer something that does not depend on jQuery. Are there any alternatives out there that meet this requirement, and if so, could you kindly direct me to them?

Answer №1

An excellent tool to consider is Split.js, which does not have any dependencies and functions seamlessly.

For a straightforward demonstration:

Split(['#sectionA', '#sectionB'], {
    sizes: [30, 70],
    minSize: 250
});

Although not specifically designed for Angular, it can be easily incorporated within a directive.

Answer №2

If you're looking for a split.js angular wrapper, angular-split is a great option that functions perfectly. To get started, simply run the following command after installing npm:

Once installed, you need to Add AngularSplitModule to your app module:

import { AngularSplitModule } from 'angular-split';

@NgModule({
declarations: [
AppComponent,
...
],
imports: [
AngularSplitModule,
...
],
providers: [...],
bootstrap: [AppComponent]
})
export class AppModule {}

import {Component, NgModule} from '@angular/core'
import {BrowserModule} from '@angular/platform-browser'
import { AngularSplitModule } from 'angular-split'

@Component({
selector: 'my-app',
styles: [`
:host {
  display: block;
  width: 500px;
  height: 400px;
  background: grey;
 }
 `],
  template: `
  <split direction="horizontal">
      <split-area [size]="30">
          <p>Lorem ipsum dolor sit amet...</p>
      </split-area>
      <split-area [size]="70">
          <p>Sed ut perspiciatis unde omnis iste natus erro...</p>
      </split-area>
  </split>`,
})
export class App {}


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

Check out this plunker example

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Changing the names of object keys in JavaScript by utilizing a conversion object

Let's dive right in: I have a list of countries along with their respective values: { Mainland China: 14375, Japan: 20, Thailand: 19, Singapore: 18, South Korea: 15, Hong Kong: 14, Taiwan: 10, Germany: 8, Malaysia: 8, Macau: 7, France: 6, Vietnam: 6 ...

Updating ASP Update panel causes unexpected issues with jQuery star rating system

After incorporating an updatePanel into my ListView, I encountered a problem with my rating system. Upon initial page load, everything appears fine using the krajee-star rating library: https://i.sstatic.net/JmWI5.jpg However, during a partial-postback, ...

The expiration time and date for Express Session are being inaccurately configured

I'm experiencing an issue with my express session configuration. I have set the maxAge to be 1 hour from the current time. app.use( session({ secret: 'ASecretValue', saveUninitialized: false, resave: false, cookie: { secure ...

Sorry, I am unable to provide the requested service as it involves rewriting content that is not owned by the

As a newcomer to Angular, I am working on an example from the developer guide to help me grasp the concepts. Here's the code I have so far, but I'm encountering an error that says: "TypeError: Cannot read property 'template' of undefine ...

Enable automatic scrolling when a button on the previous page has been clicked

Imagine there are two buttons (Button 1 and Button 2) on a webpage (Page A). Clicking on either button will take you to the same external page (Page B). How can we ensure that Button 1 takes you to the top of Page B, while Button 2 automatically scrolls do ...

A guide to building a versatile dropdown component with Material UI or MUI in a React application

Is there a way to create a reusable dropdown component using Material UI or MUI in React? ...

Encountering invalid parameters while attempting to utilize the track.scrobble service from the Last.Fm API in a Node.js application

After successfully completing the Last.Fm authentication process following the instructions provided here, I received the session key without any issues. However, my attempts to make an authenticated POST request to the track.scrobble method of the Last.Fm ...

Trouble arises when attempting to open a popup programmatically using jQueryMobile due to a JavaScript error

When attempting to open a jQuery Mobile popup programmatically, I encountered a JavaScript runtime error. The specific error message is: 0x800a138f - JavaScript runtime error: Unable to get property 'nodeName' of undefined or null reference I c ...

Upon clicking the 'Add Image' button, TINYMCE dynamically incorporates an input

I am in search of creative solutions to address an issue I'm facing. Currently, I am utilizing TINYMCE to incorporate text into my webpage. However, I would like to enhance this functionality by having a feature that allows me to add an image along w ...

Privacy protection feature in Firefox is preventing data from being pushed to Google Tag Manager's Datalayer

Recently, I discovered that the conversion tracking in Google Analytics for a website we developed and maintain has been inaccurate by 20% - 40% daily. After testing in various browsers except Firefox, conversions are reflected in Analytics immediately wi ...

Determine if an object has been submitted in a MEAN / AngularJS application

I am working with an AngularJS frontend and using Express, Node, and MongoDB on the backend. My current setup is as follows: // my data to push to the server $scope.things = [{title:"title", other properties}, {title:"title", other properties}, {titl ...

Leveraging Web API and AngularJS for the seamless retrieval of Excel files

After successfully uploading an Excel spreadsheet to my file server through the Web API, I am now facing trouble downloading the same file for user modification. The current outcome when attempting to download is simply garbage. The following is my server ...

Separating a string based on commas while disregarding commas within multiple sets of double quotation marks

I have a String that looks like this: value 1, value 2, " value 3," value 4, value 5 " ", value 6 I am trying to split this string by comma, but I want to ignore any commas that are inside a pair of double quotes. The desired output I am looking for i ...

Can the swipe navigation feature be disabled on mobile browsers?

Currently, I am in the process of creating a VueJS form that consists of multiple steps and includes a back button for navigating to the previous step. The steps are all managed within a parent component, which means that the URL and router history remain ...

Transform your JavaScript XMLHttpRequest into jQuery just like that

Is it possible to convert this code to jQuery? Perhaps by utilizing jQuery.get(). However, it seems that there is no responsetype of arraybuffer. var request = new XMLHttpRequest(); request.open("GET", url, true); request.responseType = "arraybuffer"; req ...

Assigning values to template variables in Express 4's routes/index

Recently, I started using node.js and express. To set up express 4, I used the command "express myAppName" in the terminal, which created a default directory with Jade templates as default. The main file, app.js, has the following standard express boilerp ...

Dealing with the challenges posed by middleware such as cookie access and memory leaks

Utilizing express with cookieParser() where my client possesses the cookie named: App.Debug.SourceMaps. I've crafted a middleware as follows: app.get('/embed/*/scripts/bundle-*.js', function(req, res, next) { if (req.cookies['App ...

No elements present in TypeScript's empty set

Question for discussion: Can a type be designed in TypeScript to represent the concept of an empty set? I have experimented with defining one using union, disjoint union, intersection, and other methods... ...

Receive real-time updates on incoming messages in your inbox

I'm seeking advice on implementing live update messages in my code. Here's what I have so far: <script> function fetch_messages(){ var user_id = "1" // example id $.ajax({ url: "do_fetch.php", t ...

Converting a jQuery DOM element into a string representation

Currently, I am working with a textarea that contains the contents of an HTML file. This textarea includes all elements of my HTML page such as doctype, head, html, etc. My goal is to save the content of the textarea into a DOM variable using $.parseHTML: ...