Wednesday, 18 May 2016

Template rendering by using ng-include directive

Ng-include:
Fetches, compiles and includes an external HTML fragment.

template1.html
<h1> Hello !! I am from template1 </h1>

Index.html
<div ng-controller="ExampleController">
  <h1>Hello From index</h1>
  <div>
    <div ng-include="template1.html "></div>
  </div>
</div>

Output:

Hello From index
Hello!! I am from template1


1 comment:

  1. It is nice blog Thank you porovide importent information and i am searching for same information to save my time thank you for sharing Ruby on Rails Online course Bagalore

    ReplyDelete