Git Product home page Git Product logo

Comments (12)

travist avatar travist commented on July 16, 2024 7

We are working on a new solution to wrap the existing angular-material to create a new Form.io renderer around that framework. This is coming, but it may be the end of the year before it is ready for production.

from angular.

vipinc38 avatar vipinc38 commented on July 16, 2024 4

@travist Could you please confirm if angular/material can be applied on formio and if so, what needs to be done to get the formio working with angular/material.

from angular.

travist avatar travist commented on July 16, 2024 1

Hello @amccubbin

I am thrilled to see this come from the community. This library was actually developed to support multiple dynamic templates, which you can see from the templates folder.

This file https://github.com/formio/ng2-formio/blob/master/src/templates/bootstrap.templates.tpl.ts serves as the "template" that the library uses to load the template, which can also utilize custom dependencies. The idea is to implement it like it is here https://github.com/formio/ng2-formio/blob/master/src/index.ts where to use Material you would say something like.

import { ModuleWithProviders } from '@angular/core';
import { FormioBaseModule } from './formio';
import { FORMIO_MATERIAL } from './templates/material.templates';
FormioBaseModule.setTemplate(FORMIO_MATERIAL);
export const FormioModule = FormioBaseModule.forRoot();

This would then load the material template into the core renderer and it would use that instead. I did run into an issue though with the forRoot() declarations like Datetimepicker (which is bootstrap specific. Here is the issue for that which will need to get resolved to keep the core agnostic of template. angular/angular#14022. Until that is fixed, I had to do something ugly like this to get it to not throw errors. https://github.com/formio/ng2-formio/blob/master/src/formio.ts#L20

Let me know if this points you in the right direction. My goal is to have this library support all the major UI frameworks.

Thanks!

Travis.

from angular.

amccubbin avatar amccubbin commented on July 16, 2024

Great, that helps a lot. I'll poke around and try to scope out the time it would take to make this work. Since I'm not using bootstrap, having alternative templates would be quite helpful.

from angular.

amccubbin avatar amccubbin commented on July 16, 2024

How do the recent changes to the underlying renderer affect templating? Will integrating material design directly be possible, or will we be forced to use bootswatch for styling?

from angular.

rostag avatar rostag commented on July 16, 2024

@travist — links from your previous answer aren't working anymore. Can you please suggest what is current recommended solution for applying Material to Form.io?

from angular.

SteveDunlap13 avatar SteveDunlap13 commented on July 16, 2024

Hi. Is there any update to using different templates (eg Material) ? The link above is broken...

from angular.

pankaj-git avatar pankaj-git commented on July 16, 2024

same issue, please suggest.

from angular.

travist avatar travist commented on July 16, 2024

The angular-formio library is now a wrapper around our Vanilla JS renderer @ https://github.com/formio/formio.js. The unfortunate thing is that templating is not as easy with the VanillaJS renderer than the previous angular version.

What will be needed is the ability to control the class names that are created within this renderer so that any CSS framework can be applied to it.

from angular.

gopalharis avatar gopalharis commented on July 16, 2024

@travist : We have the same question as @vipinc38, our project also requires to mix Angular/Material with form.io

from angular.

gopalharis avatar gopalharis commented on July 16, 2024

thanks for the quick response @travist it's helpful to know.

from angular.

HannaKurban avatar HannaKurban commented on July 16, 2024

Closed due to no activity

from angular.

Related Issues (20)

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.