Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

angular component between tags

//  <ng-content></ng-content>
@Component({
  selector: 'app-demo',
  template: '<div>{{title}}</div>
             <br>
             <ng-content></ng-content>',
})
export class DemoComponent {
  title = 'Works!';
}

//Content to be projected:

<app-demo>This is projected content!</app-demo>

//The output will be:

Works!
This is projected content!

Comment

PREVIOUS NEXT
Code Example
Javascript :: regex between brackets multiline line 
Javascript :: dangerouslySetInnerHTML did not match error in React 
Javascript :: center image jsx css 
Javascript :: Masonry js cdn 
Javascript :: join array enclosing each value with quotes 
Javascript :: if string javascript 
Javascript :: jquery change font color 
Javascript :: preview image file upload javascript 
Javascript :: plusieurs style sur un element javascript 
Javascript :: how to check if input file is empty in jquery 
Javascript :: javascript validate number only 
Javascript :: javascript sort array of objects by number 
Javascript :: get count of div by class 
Javascript :: mongoose connection nodejs 
Javascript :: javascript random number between 
Javascript :: convert/replace space to dash/hyphen javascript 
Javascript :: export type you may need an appropriate loader to handle this file type 
Javascript :: react hide source code 
Javascript :: jquery doc ready 
Javascript :: javascript repeat element in array 
Javascript :: vue truncate text 
Javascript :: js convert set to array 
Javascript :: remove key item from local storage 
Javascript :: moment is not defined 
Javascript :: console.dir depth 
Javascript :: jquery change text of div 
Javascript :: jquery check if checkbox is not checked 
Javascript :: fontawesome in next js 
Javascript :: image is not displaying in react js 
Javascript :: props.history.push with data 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =