GithubHelp home page GithubHelp logo

denysvuika / ng2-dynamic-content Goto Github PK

View Code? Open in Web Editor NEW
56.0 4.0 29.0 46 KB

Home Page: https://denys.dev/2016-11-27/dynamic-content-in-angular/

License: MIT License

TypeScript 76.38% HTML 8.22% JavaScript 15.40%

ng2-dynamic-content's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

ng2-dynamic-content's Issues

Dynamically adding a component

I created a component "app-myname" but When I am giving below string

<app-myname myname='Hashmi'></app-myname>

It is giving error.

VM1142 AppComponent_Host.ngfactory.js:5 ERROR Error: Template parse errors:
'app-myname' is not a known element:

  1. If 'app-myname' is an Angular component, then verify that it is part of this module.
  2. If 'app-myname' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
    [ERROR ->]
    "): ng:///RuntimeComponentModule/RuntimeComponent.html@0:5
    at syntaxError (VM1118 vendor.js:8689)
    at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (VM1118 vendor.js:26863)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate (VM1118 vendor.js:32409)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate (VM1118 vendor.js:32396)
    at VM1118 vendor.js:32339
    at Set.forEach ()
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileComponents (VM1118 vendor.js:32339)
    at VM1118 vendor.js:32257
    at Object.then (VM1118 vendor.js:8680)
    at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndAllComponents (VM1118 vendor.js:32255)
    ``

Runtime compiler is not loaded

Hi,

When browsing an application (based on angular-cli) compiled for production in Angular 4.0.3:

ng build --env=prod -prod

a runtime error happens when loading a dynamic component (RuntimeContentComponent):

Error: Runtime compiler is not loaded

The same happens when AOT is disabled:

ng build --env=prod -prod -no-aot --aot=false

npm start generate error like below

[email protected] start C:\Users\rurbanski1\Projekty\ng2-dynamic-content
tsc && concurrently "tsc -w" "npm run serve"

node_modules/rxjs/Subject.d.ts(16,22): error TS2415: Class 'Subject' incorrectly extends base class 'Observable'.
Types of property 'lift' are incompatible.
Type '<T, R>(operator: Operator<T, R>) => Observable' is not assignable to type '(operator: Operator<T, R>) => Observable'.
Type 'Observable' is not assignable to type 'Observable'.
Type 'T' is not assignable to type 'R'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] start: tsc && concurrently "tsc -w" "npm run serve"
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\rurbanski1\AppData\Roaming\npm-cache_logs\2017-07-21T12_03_26_512Z-debug.log

node v6.10.3
npm v5.3.0

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.