Skip to content

Instantly share code, notes, and snippets.

@vivainio
Created September 17, 2017 09:30
Show Gist options
  • Select an option

  • Save vivainio/a0adbc90919c3c1118d0117d7081134a to your computer and use it in GitHub Desktop.

Select an option

Save vivainio/a0adbc90919c3c1118d0117d7081134a to your computer and use it in GitHub Desktop.
<div>
<h2>Home</h2>
<p>{{home.message}}</p>
<h3>Without anything</h3>
<my-name></my-name>
<h3>With simple string</h3>
<my-name simplestring="simple static from angular"></my-name>
<h3>With dynamic string</h3>
<my-name simplestring="{{$ctrl.message}}"></my-name>
<button ng-click="$ctrl.changeMessage()">Add period</button>
<h3>With complex object</h3>
<my-name id="mycomplex"></my-name>
<button ng-click="$ctrl.modifyComplex()">Add line</button>
<h3>With some slot content</h3>
<my-name simplestring="{{$ctrl.message}}">
<p>Nested componentant 'transcluded' from angular
<span ng-bind="$ctrl.message"></span>
</p>
</my-name>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment