Angular 4 Dynamically Create Component from User Definable input - html

I'm looking to build an App in Angular 4 that would allow components to be dynamically created from storage (database, url, server stored file). The goal is to allow users to build there own components to create custom dashboards to view data.
I've been looking through google and stackoverflow to see if something like this has been achieved, but I have not seen anything to point me in the right direction.
If this is possible would anyone be willing to explain or link me to a resource to help me get started on this?
Thank you in advance

You can check these out:
https://medium.com/front-end-hacking/dynamically-add-components-to-the-dom-with-angular-71b0cb535286
https://angular.io/guide/dynamic-component-loader
I prefer number 1 because it provides a very detailed & clear guide.

Related

How to add manage temparory data in DotnetNuke?

I am beginner in DNN. I am creating a module which provides Login, Dashboard and Add-Update Form. I have data in JSON format. I want to store it temparory while user use the website. Data will be destroy as soon as user will close the website.
Currently I have created a folder in my Solution Explorer of project in Visual Basic and created 3 .json files which stores login_info.json, basic_info.json and auth_info.json. I write json data whenever user login and I make it blank when user logout.
Above method is working fine now but I afraid it will work when I will publish this module.
Also I may have situation where I need to store image some where. I don't know how I will manage.
Can anybody please guide me?
Is this proper way to store data temparory in DNN?
Is there any other better way?
After getting one of reply for Database Suggestion
Is there any table which same as User Meta in DotnetNuke?
You use the ConnectionString that is used by DNN and access the database as you would normally.
DotNetNuke.Common.Utilities.Config.GetConnectionString()
Or you can use the Data Access Layer that the DNN Framework supplies. For that take the Christoc Templates. In there is all you need to communicate with the DB.

Multiple Shiny apps using the ui to populate the second app

I currently have a app that manages projects. The user sees a list of projects and can select one. They can should (it would be nice) be able to click a run button and have another app open. The parameters stored in the project they selected are populated into the second application. The issue I am having is firing the second application. runApp generates the following.
ui code line:
actionButton("RunProj", "Run"),
Warning in run(timeoutMs) :
Unhandled error in observer: Key / already in use
observeEvent(input$RunProj)
I would like to trigger the second app and pass in the location of the project directory I have looked at parseQueryString and still trying to figure out a way to include that. Maybe via a redirect?
Any suggests would be much appreciated.
Regards,
Rich
I'm not 100% sure if I understand your intention correctly but here is a few things I think you may want to think about.
In one project, if you want to run a few kinds of analyses, you may want to try navbarPage
If there are many different types of analyses, you may want to try shinydashboard
If you know the link to each app and you really want to add those "run" buttons, you can add a button manually in ui.R. I think you can write some codes in server.r to generate the link based on your database.
tags$a(href="the link to your apps", class= "btn btn-default", "Run App")

How to run sql query to return data from different joomla components

I am trying to customize the source files of a Joomla component.
Before the Joomla MVC model introduced, I was able to run SQL queries in a component, Kunena 1.0 to select data from another component. e.g Sobi2.
However, after Kunena 1.5 [MVC model] was introduced, I do not know how / where to add the SQL query to select data from Sobi2.
I believe I need to add some codes in the files of the /models/ or /func/ folder. But can someone provide more detailed assistance on how I can achieve this?
The data interaction is done by the model, you will find Kunena models in the model folder.
Querying the SOBI2 databse is the same as before, MVC wouldn't actually affect how you do this.
To get your head around MVC, have a look at:
http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1
For examples of how to query the database in your model, look at:
http://docs.joomla.org/How_to_use_the_database_classes_in_your_script
In simple terms, the Controller directs to the appropriate view (view.html.php), this view then interacts with the model, and then directs to a template file (normally located in the view/tmpl folder.
Hope this helps.

Create an aMember plugin to integrate with Interspire

I need to integrate aMember with Interspire. I need aMember to completely sync with Interspire. When users register for aMember, they are also placed in the Interspire database, and are placed in the right group so that we may restrict access.
I have searched for a plugin to do this, and haven't found anything. I have also tried to make the plugin myself, but I have found no basic samples of such a plugin. I looked on the Wiki but the info and examples there are not much help. I have also tried to look at other plugins for other systems, but sense those other systems are different from Interspire, the way they are handled is not exactly how you would handle integrating with Interspire, so I was wondering if there is something we can do to get this plugin made, Or some more examples to look at that better explain how to make the plugin myself.
I know this is an old question, however I have a solution I have used and it works. Just answering this in the event you never found the solution, or someone else stumbles upon this and needs an answer.
You don't need to create a plugin for aMember. Using cURL in PHP you can make 1 action perform 2 things at the same time.
You would need to modify the registration step. It has been a while since I looked in the amember code to tell you which php file to edit, ect and its different probably with different amember versions..
On your registration form you should have HTML code for the form, it's action URL should point you to the correct file. It would start something like:
<form action="registration.php" method="post" class="something">
rest of the code here...
So in that example, I would look at registration.php and it should then take the data the user entered and handle it. it probably checks if the users exists in your amember users, if not then it adds them. At that point, you know everything is good and if your amember is setup to then send the user to paypal, it may have code for starting the payment integration. Between those steps (after it added the user to your db and before it sends them off to go pay) add your own code. You could just add the php code right there to use curl and add them to interspire. My way, I would create a function and just add 1 line of code to this file to call that function.
AddToIEM(firstname,lastname,ip,email)
Then there is probably a functions.php file for amember. In that file, i would create a function to add take their info passed above and add them into your IEM.
Additionally, you could take the plugin amember has for Aweber integration and modify it to use Interspire.
This is just an idea outline, and not real working code. You will need to lookup curl and figure out how to use it to add them into your interspire.
You can do this pretty easily with the amember hook system. I actually will probably be doing this sometime soon. If I do, I'll try to post a snippet. In the meantime, just take a look at the signup hooks in amember.

Delete accounts with Razor Web Pages

So, I'm working through a basic membership management admin panel but I can't quite figure out how to delete a user account. I can create one easily enough with the WebSecurity class, but this class doesn't appear to have any functions to delete an account.
What exactly do i have to do to get this functionality?
Edit: If you are using ASP.NET Web Pages 2 you are now able to accomplish the above by calling the DeleteUser() and DeleteAccount() functions available in WebMatrix.WebData.SimpleMembershipProvider. If you are using ASP.NET Web Pages 1 the answer is still valid. Refer to the SimpleMembershipProvider Class MSDN documenation for more information.
You will have to write your own code to delete the account. It's simply an entry in your database, so use the Database helper to remove the relevant rows from the webpages_UserInRoles,webpages_Membership and UserProfile tables.
The checkmarked answer is incorrect. Use
Membership.DeleteUser()