Giter VIP home page Giter VIP logo

base-starter-angular's Introduction

Base Starter for Vaadin components with Angular

Prerequisites

First install yarn.

Build Setup

# install dependencies
$ yarn install

# serve with hot reload at localhost:4200
$ yarn start

# build for production with minification
$ yarn build

This project was generated with Angular CLI version 7.0.3.

To get more help check out the Angular CLI README.

Recreating this project

$ yarn global add @angular/cli
$ ng new hello-angular
$ cd hello-angular

$ yarn add @vaadin/vaadin-core

In src/app/app.module.ts:

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

...and inside @NgModule add:

schemas: [CUSTOM_ELEMENTS_SCHEMA],

In src/app/app.component.ts:

import '@vaadin/vaadin-button/vaadin-button.js';
import '@vaadin/vaadin-text-field/vaadin-text-field.js';

In src/app/app.component.html:

<vaadin-text-field #textField placeholder="Type Something"></vaadin-text-field>
<vaadin-button (click)='title=textField.value'>Click Me!</vaadin-button>
<h2>Hello {{title}}!</h2>

base-starter-angular's People

Contributors

amahdy avatar angular-cli avatar juhopiirainen avatar limonte avatar macjuan avatar platosha avatar tomivirkki avatar web-padawan avatar yuriy-fix avatar zch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

base-starter-angular's Issues

Angular content update

How to update template to v8:

  • migrate angular-cli.json to angular.json (should be done in v6 migration)
  • migrate Http modules
  • migrate builders to v8
    Automatic migration fails due to some minor differences in project structure left from older version.
    I'll make a PR shortly.

Local workspace file ('angular.json') could not be found.

hoehmann@XXXXX MINGW64 /d/Dev/git/base-starter-angular (master)
$ ng serve
Local workspace file ('angular.json') could not be found.
Error: Local workspace file ('angular.json') could not be found.
at WorkspaceLoader._getProjectWorkspaceFilePath (C:\Users\hoehmann\AppData\Roaming\npm\node_modules@angular\cli\models\workspace-loader.js:37:19)
at WorkspaceLoader.loadWorkspace (C:\Users\hoehmann\AppData\Roaming\npm\node_modules@angular\cli\models\workspace-loader.js:24:21)
at ServeCommand._loadWorkspaceAndArchitect (C:\Users\hoehmann\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:195:32)
at ServeCommand. (C:\Users\hoehmann\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:47:25)
at Generator.next ()
at C:\Users\hoehmann\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:7:71
at new Promise ()
at __awaiter (C:\Users\hoehmann\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:3:12)
at ServeCommand.initialize (C:\Users\hoehmann\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:46:16)
at Object. (C:\Users\hoehmann\AppData\Roaming\npm\node_modules@angular\cli\models\command-runner.js:87:23)

Add customized Lumo

It would be really nice to have included a small customization to the lumo theme (e.g. changing the base color) as it is really hard (at least for a beginner) to find out on how/where to do this, whereas it is a common use case.

Adding vaadin-password-field leads to an exception

I tried to add a password-field by adding <vaadin-password-field></vaadin-password-field> to app.component.html and import '@vaadin/vaadin-text-field/vaadin-password-field.js'; in app.component.ts

Unfortunately, I get the following exception on runtime:
zone.js:682 Unhandled Promise rejection: Object prototype may only be an Object or null: undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Object prototype may only be an Object or null: undefined at setPrototypeOf (<anonymous>) at Module.__extends (tslib.es6.js:25) at vaadin-password-field.js:45 at Module../node_modules/@vaadin/vaadin-text-field/src/vaadin-password-field.js (vaadin-password-field.js:156) at __webpack_require__ (bootstrap:83) at Module../node_modules/@vaadin/vaadin-text-field/theme/lumo/vaadin-password-field.js (vaadin-password-field.js:1) at __webpack_require__ (bootstrap:83) at Module../node_modules/@vaadin/vaadin-text-field/vaadin-password-field.js (vaadin-password-field.js:1) at __webpack_require__ (bootstrap:83) at Module../src/app/app.component.ts (0.js:11700) TypeError: Object prototype may only be an Object or null: undefined at setPrototypeOf (<anonymous>) at Module.__extends (http://localhost:4200/vendor.js:77134:5) at http://localhost:4200/0.js:9537:52 at Module../node_modules/@vaadin/vaadin-text-field/src/vaadin-password-field.js (http://localhost:4200/0.js:9648:2) at __webpack_require__ (http://localhost:4200/runtime.js:84:30) at Module../node_modules/@vaadin/vaadin-text-field/theme/lumo/vaadin-password-field.js (http://localhost:4200/0.js:10431:87) at __webpack_require__ (http://localhost:4200/runtime.js:84:30) at Module../node_modules/@vaadin/vaadin-text-field/vaadin-password-field.js (http://localhost:4200/0.js:10501:94) at __webpack_require__ (http://localhost:4200/runtime.js:84:30) at Module../src/app/app.component.ts (http://localhost:4200/0.js:11700:108)

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.