Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom html templates #46

Merged
merged 3 commits into from
May 22, 2017
Merged

Conversation

mehmetc
Copy link
Contributor

@mehmetc mehmetc commented May 17, 2017

I do not like to include HTML files inside my JS files.
With this pull-request I can save my files in the myView/html/templates directory. The files will be compiled into a customTemplates.js file. This $templateCache can be referenced with a templateUrl from within your component

ex. myView/html/templates/myFile.html can be referenced using templateUrl: 'myFile.html'

app.component('prmSomeComponentAfter', {
    bindings: {
        parentCtrl: '<'
    },
    templateUrl: 'myFile.html',
    controller: function() {
    // your code here
    }
  });

@gpeterso
Copy link
Contributor

👍

@ajones3066
Copy link

ajones3066 commented May 18, 2017 via email

@muratseyhan
Copy link
Contributor

👍 We've been storing the view name in a global variable just to work around this.

@thatbudakguy
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants