Posts

Showing posts with the label Angular

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   'angular-datatables' ; import  {  Subject  }  from   'rxjs' ; import  {  NgbDateFRParserFormatter  }  from   './../../../datefor

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,  &qu

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}-linux-x