Posts

Showing posts with the label Angular

Handling Raw Html

For sometime now I've been at a point in my research to find the proper way to handle raw html. Sometimes you need your api to push raw html with syntax that can't be edited once its submitted.  Handling all html in a 2D array where the first in just the html tag and the second is a child's value which can also be a html tag. { ["p"]["test"]  This may also be another case to start my project with a headless orchard core project. Using fluid syntax might be the better way to allow an api to take information and using a custom javascript library to convert html to the api? 

Angular 9: Loading App

A lot of my articles this month are going to be useless to some people because they arent organized in any way. This is because there were quick notes collected when I was consulting and using angular 9. Which was working for me at that time to complete my work. Until I have another professional angular project, angular 12 is looking like a pain to upgrade from 9 so much so it has slowed my personal projects down. So all research and work I do is on my personal time.  https://medium.com/@tomastrajan/how-to-style-angular-application-loading-with-angular-cli-like-a-boss-cdd4f5358554 https://loading.io/# https://napster2210.github.io/ngx-spinner/

Using Angular-Datatables Notes

These notes are based on angular-datatables v 8.0.0   Using Angular Component In order to get a angular component say to run you need to create the code in the same scope. That's how I managed to get it running. So for example you have to create a model via angular and attach it to a jquery event. What your doing is in the definition of the datatable is passing the logic in at that point on how to run.   import  {  Component ,  OnDestroy ,  OnInit ,  ViewChild ,  AfterViewInit  }  from   '@angular/core' ; import  {  Meta ,  Title  }  from   '@angular/platform-browser' ; import  {  HttpClient  }  from   '@angular/common/http' ; import  {  NgbDateStruct ,  NgbModal  }  from   '@ng-bootstrap/ng-bootstrap' ; import  { formatDate }  from   "@angular/common" ; import  {  DataTableDirective  }  from   'angu...

Angular 8 Material - mat-slide-toggle is unknown!

Currently wrapping things up with the project: MyPatco and you can find the repo here for example. Under my angular5 repo which isn't really angular 5 anymore but infact angular 8. That tells you how long its been since I've actually been working on this project. Or it could say how quickly angular is updating. Either way I'm going through my notes and writing about all the bugs I faced as I do with all my projects. This was probably the easiest bug but one that I thought was very interesting. I would have thought the component would be in scope give the fact that its under the library material. However it needs to be imported explicitly. Which makes me wonder what other pieces or components need to be imported as well. I currently use a small set of features for mypatco, I do plan to add notifications. I have the features listed out either in my issues under mypatco and whatever extra libraries I use under the repo's wiki. To answer my question from earlier,  ...

Angular + Bootstrap 4 Navbar with Right Dropdown

From reading the document on bootstrap (version: 4.3.1)  and comparing my notes from version 3. There doesn't seem to be an example for a right dropdown with a navbar. Flexboxes can be a challenge and moving from bootstrap 3 isn't but here is some solutions. https://stackoverflow.com/questions/51013313/bootstrap-dropdown-with-angular-6 https://ng-bootstrap.github.io/#/components/dropdown/examples https://stackoverflow.com/questions/51013313/bootstrap-dropdown-with-angular-6 Examples -  https://www.codeply.com/go/bRSyq1ooFu/bootstrap-4-navbar-dropdown-right -  https://www.codeply.com/go/cxXqBnGrPx  (icon on the right) -  https://www.codeply.com/go/1ZFF5CEXM5 https://www.codeply.com/go/1ZFF5CEXM5 https://medium.com/wdstack/bootstrap-4-custom-navbar-1f6a2da5ed3c https://www.codeply.com/go/bRSyq1ooFu/bootstrap-4-navbar-dropdown-right With Queryjs  I should probably put this in another article, still I'm killing two birds with one stone....

.NET Core Docker Image for SPA Applications

If your looking to get CI/CD up and running with a SPA Application I recommend this setup. This article is based on Aspnet Core 2.1 and up. If you read the docker docs on the 2.1 version of dotnet core you will see they removed nodejs, which breaks a bunch of stuff if your using dotnet core with either Angular2 or Reactjs. I currently use gitlab-runners but with the volumes config to publish my sites. Notes from Dotnet Using NodeJS in  microsoft/aspnetcore-build , but this is missing from  dotnet/core/sdk:2.1 . What should I do? You can either install NodeJS by adding a few lines of code to your Dockerfile that download and extract NodeJS, or you can use the multi-stage feature of Docker and the official NodeJS images. Sample code to install NodeJS on your own: # set up node ENV NODE_VERSION 8.9.4 ENV NODE_DOWNLOAD_SHA 21fb4690e349f82d708ae766def01d7fec1b085ce1f5ab30d9bda8ee126ca8fc RUN curl -SL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-lin...

Popular posts from this blog

Aspetcore: NLog with Postgresql

Mongodb Cheatsheet

Installing Windows on Acer chromebook 15 cb3-532