Angular Material v6 Mat-Footer – “Cannot read property ‘template’ of undefined”
FIXED: This was not made clear in the material documentation, but all columns must contain a <mat-footer-cell/> element, even if only one column will contain content.
FIXED: This was not made clear in the material documentation, but all columns must contain a <mat-footer-cell/> element, even if only one column will contain content.
In my case was just necessary to compile again the project
I had the same issue. Try to remove the .angular directory! worked for me.
If you use angular-cli, you can add all your external JS files in assets folder. And then in angular-cli.json add them: “scripts”: [ “../node_modules/jquery/dist/jquery.min.js”, “../node_modules/bootstrap/dist/js/bootstrap.min.js”, “../node_modules/moment/moment.js”, “../node_modules/chart.js/dist/Chart.bundle.min.js”, “../node_modules/chart.js/dist/Chart.min.js”, “../node_modules/ng2-datetime/src/vendor/bootstrap-datepicker/bootstrap-datepicker.min.js”, “./assets/js/slimscroll.min.js”, “./assets/js/inspinia.js”, “./assets/js/metisMenu.js”, “./assets/js/footable.all.min.js” ] You can do it also with external styles: “styles”: [ “../node_modules/ng2-toastr/bundles/ng2-toastr.min.css”, “../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss”, “../node_modules/font-awesome/scss/font-awesome.scss”, “../node_modules/ng2-datetime/src/vendor/bootstrap-datepicker/bootstrap-datepicker3.min.css”, “./assets/scss/plugins/footable/footable.core.css”, “./assets/scss/style.scss” ] And of course you … Read more
As @Eric Martinez suggested, you can create a local template variable, and bind the uppercase string to the value property on the input event: <input type=”text” #input (input)=”input.value=$event.target.value.toUpperCase()” /> Alternatively, you can make this a directive: @Directive({ selector: ‘input[type=text]’, host: { ‘(input)’: ‘ref.nativeElement.value=$event.target.value.toUpperCase()’, } }) export class UpperCaseText { constructor(private ref: ElementRef) { } } … Read more
The same service instance isn’t being shared across your App and Home components because you have listed SidenavService as a provider for both. When you define service provider in the providers entry of a Component decorator, that service is then available to that component and all of its children as a singleton, meaning the same … Read more
I have done it, after doing lot of R&D , their are few steps to follow as below : Install : npm install jspdf –save typings install dt~jspdf –global –save npm install @types/jspdf –save Add following in angular-cli.json: “scripts”: [ “../node_modules/jspdf/dist/jspdf.min.js” ] html: <button (click)=”download()”>download </button> component ts: import { Component, OnInit, Inject } from … Read more
Objects are a bit tricky with the async pipe. With an Observable that contains an array, we can use NgFor and create a local template variable (hero below) that gets assigned each item of the array after the async pipe extracts the array from the Observable. We can then use that variable elsewhere in the … Read more
You need to import the Observable class this way to be able to use the interval method: import {Observable} from ‘rxjs/Rx’; or import {Observable} from ‘rxjs/Observable’; import ‘rxjs/add/observable/interval’;
For recent first: this.data.sort((a, b) => new Date(b.date1).getTime() – new Date(a.date1).getTime()); For OlderFirst: this.data.sort((b, a) => new Date(b.date1).getTime() – new Date(a.date1).getTime());