Skip to content

Commit e7eb7b0

Browse files
committed
added Materialize
1 parent 8d20150 commit e7eb7b0

File tree

7 files changed

+22
-5
lines changed

7 files changed

+22
-5
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ testem.log
3131
#System Files
3232
.DS_Store
3333
Thumbs.db
34+
35+
*.iml

angular-cli.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
"styles": [
1818
"styles.css"
1919
],
20-
"scripts": [],
20+
"scripts": [
21+
"../node_modules/jquery/dist/jquery.js",
22+
"../node_modules/materialize-css/dist/js/materialize.js"
23+
],
2124
"environments": {
2225
"source": "environments/environment.ts",
2326
"dev": "environments/environment.ts",

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
"@angular/platform-browser": "2.0.0",
2121
"@angular/platform-browser-dynamic": "2.0.0",
2222
"@angular/router": "3.0.0",
23+
"angular2-materialize": "^5.1.4",
2324
"core-js": "^2.4.1",
25+
"jquery": "^2.2.4",
26+
"materialize-css": "^0.97.7",
2427
"rxjs": "5.0.0-beta.12",
2528
"ts-helpers": "^1.1.1",
2629
"zone.js": "^0.6.23"

src/app/app.component.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
import { Component } from '@angular/core';
1+
import {Component, OnInit} from '@angular/core';
2+
import {toast} from "angular2-materialize";
23

34
@Component({
45
selector: 'app-root',
56
templateUrl: './app.component.html',
67
styleUrls: ['./app.component.css']
78
})
8-
export class AppComponent {
9+
export class AppComponent implements OnInit {
910
title = 'app works!';
11+
12+
ngOnInit(): void {
13+
toast("...and Materialize works as well!")
14+
}
1015
}

src/app/app.module.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { FormsModule } from '@angular/forms';
44
import { HttpModule } from '@angular/http';
55

66
import { AppComponent } from './app.component';
7+
import {MaterializeModule} from "angular2-materialize";
78

89
@NgModule({
910
declarations: [
@@ -12,7 +13,8 @@ import { AppComponent } from './app.component';
1213
imports: [
1314
BrowserModule,
1415
FormsModule,
15-
HttpModule
16+
HttpModule,
17+
MaterializeModule
1618
],
1719
providers: [],
1820
bootstrap: [AppComponent]

src/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<title>AngularExample</title>
66
<base href="/">
77

8+
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
89
<meta name="viewport" content="width=device-width, initial-scale=1">
910
<link rel="icon" type="image/x-icon" href="favicon.ico">
1011

src/styles.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/* You can add global styles to this file, and also import other style files */
1+
/* You can add global styles to this file, and also import other style files */
2+
@import "../node_modules/materialize-css/dist/css/materialize.css";

0 commit comments

Comments
 (0)