Skip to content

Using Material ? #4

@dr1ss

Description

@dr1ss

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions