bleenco / angular-universal-seed Goto Github PK
View Code? Open in Web Editor NEWAngular5 Universal Webpack Seed
License: MIT License
Angular5 Universal Webpack Seed
License: MIT License
Hi,
Really congratulate you for a fully functional and a great seed for angular 4 + Universal
I am really stuck at this::
import { Meta, Title } from '@angular/platform-browser'; constructor (private homeService: HomeService, private router: Router, elementRef: ElementRef, meta: Meta, title: Title) { title.setTitle('My Spiffy Home Page'); meta.addTags([ { name: 'author', content: 'Coursetro.com' }, { name: 'keywords', content: 'angular 4 tutorial, angular seo' }, { name: 'description', content: 'This is my great description.' }, ]); }
fails for me at
webpack: Failed to compile.
Hash: d35c129f0f4ac0711e08
Version: webpack 3.0.0
Time: 26738ms
Asset Size Chunks Chunk Names
6.server.js 262 kB 6 [emitted] [big]
0.server.js 1.03 MB 0 [emitted] [big]
2.server.js 216 kB 2 [emitted]
3.server.js 363 kB 3 [emitted] [big]
4.server.js 27.7 kB 4 [emitted]
5.server.js 82.3 kB 5 [emitted]
1.server.js 1.36 MB 1 [emitted] [big]
7.server.js 148 kB 7 [emitted]
8.server.js 126 kB 8 [emitted]
9.server.js 132 kB 9 [emitted]
10.server.js 107 kB 10 [emitted]
server.js 4.82 MB 11 [emitted] [big] app
favicon.ico 1.15 kB [emitted]
ERROR in /Users/ashish/Desktop/angular-universal-seed/src/app/home.component.ts (55,9): Cannot find name 'title'.
ERROR in /Users/ashish/Desktop/angular-universal-seed/src/app/home.component.ts (57,9): Cannot find name 'meta'.
Can you please direct me to the right solution of changing meta tags using the Meta Service?
Hello guys,
I'm trying to implement Material to the seed (angular/material and angular/cdk)
I've added the following module to app.module.ts :
import { NgModule } from '@angular/core';
import { MatButtonModule, MatCardModule, MatIconModule, MatInputModule, MatMenuModule, MatToolbarModule } from '@angular/material';
@NgModule({
exports: [
MatButtonModule,
MatCardModule,
MatIconModule,
MatInputModule,
MatMenuModule,
MatToolbarModule
]
})
export class MaterialModule {
}
Then just as a test I've added a button to the template :
<button mat-button>Click me!</button>
I get an error when I try to start the server after a "build:prod" :
/Volumes/Secondary/git/xxxx/dist/server.js:198766
module.exports = ../../node_modules/@angular/material/button/typings/index.ngfactory;
^
SyntaxError: Unexpected token .
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
Any idea what's going on here please ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.